SP6818 CAPCITY - Capital City

Description

There are N cities in Flatland connected with M unidirectional roads. The cities are numbered from 1 to N. The Flat Circle of Flatland (FCF) wants to set up a new capital city for his kingdom. For security reasons, _the capital must be reachable from all other cities_ of Flatland. FCF needs the list of _all_ candidate cities. You are the chief programmer at FACM (Flat Association for Computing Machinery) responsible for providing the list to FCF as soon as possible. **Input** The first line of the input file contains two integers։ 1N and 1M. Each of the following M lines contains two integers 1A, B **Output** The output file contains an integer denoting the number of candidate cities followed by the list of candidate cities in increasing order. **Example** Input: 4 4 1 2 3 2 4 3 2 1 Output: 2 1 2

Input Format

N/A

Output Format

N/A