ridu, veerge=[int(e) for e in input().strip().split(" ")] tabel=[[int(e) for e in input().strip().split(" ")] for reanr in range(ridu)] print(*[sum(veerg) for veerg in zip(*tabel)])