input: Write a function to create an object-oriented structure to solve a maze using Python. The function should take the dimensions of the maze (n, m) as input and return the shortest path from the starting point (0, 0) to the ending point (n-1, m-1). If no path exists, return None. Use the Maze class provided to solve the maze.
  
  def solve_maze(n, m):
      maze = Maze(n, m)
      return maze.solve_maze()
  
  assert solve_maze(3, 3, [[1, 1, 1], [0, 1, 0], [1, 1, 1]])==[(0, 0), (0, 1), (1, 1), (2, 1), (2, 2)]
  assert solve_maze(3, 3, [[1, 0, 1], [1, 0, 1], [1, 1, 1]])==[(0, 0), (1, 0), (2, 0), (2, 1), (2, 2)]
  assert solve_maze(3, 3, [[1, 0, 0], [0, 0, 0], [0, 0, 1]])==None
  assert solve_maze(1, 1, [[1]])==[(0, 0)]
  assert solve_maze(2, 2, [[1, 0], [0, 1]])==None
output: def solve_maze(n, m):
      maze = Maze(n, m)
      return maze.solve_maze()