Championships

아직 제출이 없습니다시간 제한1.5초메모리 제한256 MB

문제

The Computer Sports World Championships is the most important event in the calendar of every electronic entertainment fan. This year, the championships will be held in the kingdom of Byteotia. The organizing committee, appointed by the king Byteasar, is facing a difficult task -- it has to decide in which Byteotian cities competitions will take place. There are nn cities in Byteotia (numbered 11 through nn) connected by mm two-way roads.

The committee hopes that the championship will attract crowds of fans from all over the world. Obviously, the fans will travel frequently between the cities to watch the competitions of various e-sport types. The priority is therefore that the set of cities, hosting the championships events, is well connected.

We call a set of cities SS well connected, if:

  1. From every city of the set SS there are at least dd direct connections to other cities of SS.
  2. Between any two cities of SS there exists a route running only through the cities belonging to the set SS.

Additionally, to minimize the average number of visitors in each city, the committee would prefer the chosen set to be possibly large.

입력

The first line of the input contains three integers nn, mm and dd (2n200,0002\leq n\leq 200\\,000, 1m200,0001\leq m\leq 200\\,000, 1d<n1\leq d < n) denoting the the number of cities, the number of roads in Byteotia and the parameter dd, respectively. Next mm lines describe the Byteotian roads. The ii-th of these lines contains two integers a_ia\_i and b_ib\_i (1a_i,b_in1\leq a\_i,b\_i\leq n, a_ib_ia\_i\neq b\_i) indicating that the ii-th road connects the cities numbered a_ia\_i and b_ib\_i. Each pair of cities is connected by at most one direct road.

출력

If it is not possible to choose a set of cities of Byteotia that is well connected, the only line of the output should contain the word "NIE" (Polish for no).

Otherwise, the output should contain the most numerous set of cities that is well connected, in the following format. The first line should contain the number kk denoting the size of the found set. The second line should contain kk numbers representing the cities belonging to the set, in ascending order.

In case there are multiple solutions, your program can output any of them.