I forgot. The NEXT command ends the FOR command. Also, the third FOR command and the M variable sets the puzzle at the starting position.