n,k = map(int, input().split()) l = [] for i in range(n-1): l.append(list(map(int,input().split()))) if n