# coding: utf-8 # Your code here! def dfs(num,count): visited[num]=count for item in way[num]: if visited[item] == -1: dfs(item,count+1) return N,K=map(int,input().split()) way=[[] for i in range(N)] visited=[-1]*N for _ in range(N-1): a,b=map(int,input().split()) way[a-1].append(b-1) way[b-1].append(a-1) dfs(0,0) visited.sort() if len(visited)