Maze Solving Algorithm Python Template