Smol Vertex Cover

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

Given an undirected graph, find a minimum vertex cover. Crazy, right?

Let MM be the size of maximum matching, and CC be the size of minimum vertex cover. If minimum vertex cover is smol, which means CM+1C \le M + 1, then find it.

입력

The first line of input contains two integers nn and mm (1n5001 \le n \le 500, 0mn(n1)20 \le m \le \frac{n(n-1)}{2}) --- the number of vertices and edges in the graph.

Next mm lines describe edges of the graph, each of them contains two integers uu and vv (1u<vn1 \le u < v \le n) --- vertices connected by an edge. Vertices are numbered from 11 to nn.

It is guaranteed that the graph doesn't contain multiple edges.

출력

If minimum vertex cover is smol, then print its size CC on the first line, and then CC different space-separated vertices that form a vertex cover. Otherwise print "not smol" on a single line (without quotes).

If there are several possible smol minimum vertex covers, print any one of them.

힌트

Vertex cover is a set of vertices such that for each edge at least one of the endpoints belongs to the set.

Matching is a set of edges such that no two edges from it have common endpoint.

Note that a minimum vertex cover would not be accepted as a correct answer if it is not smol.