Time limit per test: 0.5 second(s) Memory limit: 65536 kilobytes
input: standard output: standard
Thecountry has N cities connected by N-1 bidirectional roads; one can travel from any city to any other by the roads. One of the biggest trade networksis going to build in some cities trade centers selling the main national product. Because building each trade center costs the company a lot of money, they want to build as few of them as possible. Becauseis the biggest producer of the main national product, a citizen living in each city must be able to reach some supermarket using at most K roads.
Your task is to determine where to build the trade centers.
The first line of the input contains two integers N and K (1≤ N≤ 30000, 1≤ K≤ 100). Each of the next N-1 lines contains two integers, denoting the numbers of the cities connected by a road. The cities are numbered starting from 1.
Output the number of the trade centers followed by the numbers of the cities where the trade centers should be built.
Novosibirsk SU Contest #2, by Novosibirsk Team #1
Codeforces (c) Copyright 2010-2021 Mike Mirzayanov