eolymp
bolt
Try our new interface for solving problems
Problems

Governor

Governor

In a town far, far away a new governor has recently been inaugurated. He didn't like speed racers so much that his first order was to raise the speed limit fine. People were very angry with him and so he decided to move out of town to give people some time to think and forgive. The governor is going for a trip throughout the country to his old friend who is also a governor in another distant town. Since airways are not reliable and prone to terrorist attacks, he chose to use existing railway system that integrates all towns in the country in a single railroad network. Since going through any town more than once during his trip there and back is quite boring, he's trying to avoid revisiting towns as much as possible. Please help him to determine the towns he has to visit more than once regardless of the chosen round trip course. \InputFile The first line contains two integer numbers \textbf{N} and \textbf{K} --- the total number of towns in the railroad network and the total number of lines between towns respectively (\textbf{2} ≤ \textbf{N} ≤ \textbf{10000}, \textbf{1} ≤ \textbf{K} ≤ \textbf{200000}). Thus each town has a serial number between \textbf{1} and \textbf{N} associated with it. The next \textbf{K} lines describe all existing railway lines by providing the serial numbers of towns \textbf{A_i} and \textbf{B_i} that this line connects together. Two towns may be connected by several railway lines. Each railway line is bidirectional. The last line contains two integer numbers \textbf{S} and \textbf{E} (\textbf{1} ≤ \textbf{S} ≤ \textbf{E} ≤ \textbf{N}) --- the serial numbers of the governor's town and of his friend’s town respectively. \OutputFile On the first line please output a single integer \textbf{T} --- the total number of towns the governor has to visit more than once (excluding towns \textbf{S} and \textbf{E}) according to the problem statement. The next \textbf{T} lines should contain the serial numbers of these towns, in increasing order.
Time limit 1 second
Memory limit 64 MiB
Input example #1
3 2
1 2
2 3
3 1
Output example #1
1
2 
Source ЛКШ-2011 Севастополь 08.08.2011 д.1 Высшая лига