N,M=map(int, input().split()) Max=[0]*M List=[[] for _ in range(M)] for n in range(N): for i,r in enumerate(map(int, input().split())): if Max[i]