class Maze: def init(self, maze): self.maze = maze
def isSafe(self, maze, x, y, visited): # Get Maze dimensions (N x M) rather than hardcodin