Simple Maze Solving Algorithm Python