eolymp
bolt
Try our new interface for solving problems
Problems

Command of the Mayor

Command of the Mayor

To ensure victory in the elections, the mayor decided to build a team of his friends, where everyone is a friend of each other. Knowing the relationship between an all \textbf{N} acquaintances mayor to build a team the greatest number of \textbf{M}. When the existence of multiple solutions is sufficient to derive only one of them. \InputFile The first line is a single number \textbf{N} - the number of acquaintances Mayor (\textbf{N} < \textbf{50}). In the second row - the number of \textbf{K} - the number of couples who have friendly relations. The following \textbf{K} lines through space-separated pair of numbers - numbers of friends. \OutputFile The first line of a single number - the largest squad of the mayor. The next line through the gap of the mayor's team in ascending numerical order.
Time limit 1 second
Memory limit 64 MiB
Input example #1
5
6
1 2
2 3
1 3
3 5
1 5
5 2
Output example #1
4
1 2 3 5