h, w = [int(i) for i in input().split()] std = [] for i in range(h): row = [int(i) for i in input().split()] std.append(row) def walk(i, j, pos=[(0, 0)]): if j+1 < w and std[i][j+1] == 0: if (i, j+1) not in pos: walk(i, j+1, pos=pos+[(i, j+1)]) if j-1 >= 0 and std[i][j-1] == 0: if (i, j-1) not...