402222: GYM100703 E Dragons in sleeping
Description
— And do dragons do the same when they want to get married? — Princess asked.
— Dragons live alone. They come in existence in people's minds. And they evanesce when people forget about them, — Dragon answered.
Dragon told Princess that when someone imagines a new dragon, a new castle appears in the Castles Valley in which the dragon lives. If nobody thinks about the dragon for a long time, he falls asleep.
Sometimes it unusual rains in the Castles Valley. There is no clouds in the sky, the sun shines brightly, but great raindrops knock frequently on the roof of the castle where dragon sleeps. And after the rain is over, a lawn with wildflowers appears in the place where the castle was before. Moreover, rainwater brooks flow along the lanes leading from this castle. If a brook reaches a castle of a waking dragon, it stops there. However, if it reaches a castle of sleeping dragon, this castle becomes a lawn, too, and a brook flows farther.
Although dragons are only dreams, they feel for sleeping ones. They learned to foresee such rains, but they don't know which castle this rain will spill on. At the same time dragons want the number of appeared lawns to be as minimum as possible. They have a time to wake up exactly one of sleeping dragons before the rain. Now they want to know, in which castle they should wake up a dragon. Your task is to find it.
For the sake of simplicity, the input contains castles with sleeping dragons only. Also it is guaranteed that a path (consisting of one or more lanes) between every two castles exists.
InputThe first line contains integers n and m (1 ≤ n ≤ 105, 1 ≤ m ≤ 2·105) — the number of castles with sleeping dragons and the number of lanes between castles.
Each of the next m lines contains two integer — numbers of castles connected by the lane.
It is guaranteed that no more than one lane between any two castles exist. Also no one lane connects a castle with itself.
OutputPrint the only integer — number of a castle in which dragon should be woken up.
If there is more then one answer, output any of them.
ExamplesInput6 7Output
1 2
1 3
2 4
3 4
4 5
4 6
5 6
4Input
4 4Output
1 2
2 3
3 4
4 1
1