Untitled
mn = input().split(" ") m = int(mn[0]) n = int(mn[1]) matrix = [] for i in range(m): line = input().split(" ") matrix.append(line) for i in range(n): for j in range(m): if matrix[i][j] == 0: print(i) for x in range(m): matrix[i][x] = 0 for y in range(n): matrix[y][j] = 0 for x in range(m): for y in range(n): print(matrix[x][y],"", end ='') print("")