input: def solve_maze(n: int, m: int) -> list:
      """
      Solve a maze using an object-oriented structure in Python.
      Given the dimensions of the maze (n by m), return a list representing the path
      from the start (top-left corner) to the end (bottom-right corner).
      >>> solve_maze(3, 3)
      []
      >>> solve_maze(5, 5)
      []
      """
      maze = Maze(n, m)
      return maze.solve_maze()
output:     class Maze:
          def __init__(self, n, m):
              self.n = n
              self.m = m
              self.maze = [[0 for _ in range(m)] for _ in range(n)]
              self.path = []
  
          def solve_maze(self):
              if self._solve_maze_util(0, 0):
                  return self.path
              return []
  
          def _solve_maze_util(self, x, y):
              if x == self.n - 1 and y == self.m - 1:
                  self.path.append((x, y))
                  return True
  
              if self._is_safe(x, y):
                  self.path.append((x, y))
                  self.maze[x][y] = 1
  
                  if self._solve_maze_util(x + 1, y):
                      return True
                  if self._solve_maze_util(x, y + 1):
                      return True
  
                  self.path.pop()
                  self.maze[x][y] = 0
  
              return False
  
          def _is_safe(self, x, y):
              return 0 <= x < self.n and 0 <= y < self.m and self.maze[x][y] == 0