def dfs(x,y,path): if x==m-1 and y==n-1: return path paths=[] if x-1>=0 and graph[x-1][y]==0 and (x-1,y) not in path: paths.extend(dfs(x-1,y,path+[(x-1,y)])) if x+1<=m-1 and graph[x+1][y]==0 and (x+1,y) not in path: paths.extend(dfs(x+1,y,path+[(x+1,y)])...