a = list(map(int, input().split(" "))) l1 = [] for i in range(a[0]): x = list(map(int, input().split(" "))) l1.append(max(x)) print(*l1)