- Time limit: 1.00 s
- Memory limit: 512 MB
There are cities and roads between them. There is a route between any two cities.
A city is called necessary if there is no route between some other two cities after removing that city (and adjacent roads). Your task is to find all necessary cities.
Input
The first input line has two integers and : the number of cities and roads. The cities are numbered .
After this, there are lines that describe the roads. Each line has two integers and : there is a road between cities and . There is at most one road between two cities, and every road connects two distinct cities.
Output
First print an integer : the number of necessary cities. After that, print a list of cities. You may print the cities in any order.
Constraints
Example
Input:
5 5 1 2 1 4 2 4 3 5 4 5
Output:
2 4 5