import sys L = list(list(map(int,s)) for s in sys.stdin.read().splitlines()) W = len(L[0]) ; H = len(L) N=0 for i in range(H): for j in range(W): v = L[i][j] # look right r = all(L[i][k]