Recursive version of MazePath