ridu, veerge=[int(e) for e in input().strip().split(" ")] tabel=[] for reanr in range(ridu): reamassiiv=[int(e) for e in input().strip().split(" ")] tabel.append(reamassiiv) #print(tabel) summad=[] for veerunr in range(veerge): summa=0 for reanr in range(ridu): summa+=tabel[reanr][veerunr] summad.append(summa) #print(summad) #print(" ".join([str(summa) for summa in summad])) #print(3, 5, 6, 7) print(*summad)