solves mazes from text file input, using stack and queue data structures