N,M,K=map(int,input().split()) S=[input() for _ in range(M)] B=[] for i in range(N): r=0 for j in range(M): if S[j][i]=='1': r|=1<