Turn, Turn, Turn

A Russian problem from the 1999 Mathematical Olympiad:

Each cell in an 8×8 grid contains an arrow that points up, down, left, or right. There’s an exit at the top edge of the top right square. You begin in the bottom left square. On each turn, you move one square in the direction of the arrow, and then the square you have departed turns 90° clockwise. If you’re not able to move because the edge of the board blocks your path, then you remain on the square and it turns 90° clockwise. Prove that eventually you’ll leave the maze.

Click for Answer