Use Breadth First Search to walk out of a 2D maze.