N,K = map(int,input().split()) AB = [tuple(map(int,input().split())) for i in range(N-1)] if N