#Q105. 「一本通 3.6 练习 4」电力

「一本通 3.6 练习 4」电力

Description

Original source: CTU Open 2004

Given an undirected graph, determine the maximum number of connected components after deleting one vertex.

Input Format

Multiple test cases. The first line contains two integers PP and CC, representing the number of vertices and edges, respectively.
The next CC lines each contain two integers p1p1 and p2p2, indicating an edge between p1p1 and p2p2. There are no duplicate edges. Input ends with 0 0.

Output Format

Output the result for each test case on a separate line.

Sample 1

3 3
0 1
0 2
2 1
4 2
0 1
2 3
3 1
1 0
0 0

1
2
2

Constraints and Hints

1P10000,C0,0p1,p2<P1 \le P \le 10000, C \ge 0, 0 \le p1, p2 < P