Move with arrows. Push the blocks marked I onto the X, then go to the flag. If the block has II or III, you can only push it as a line of 2 or 3 blocks. Press Z to undo, R to reset.