Solves mazes inputted as txt files using stacks and queues