Largest Friend Group
Friendship is undirected and transitive within a group. Find the size of the largest connected friend group.
Input
The first line contains n and m. The next m lines contain friendships.
1 <= n <= 1000
Output
Print the largest component size.
Example
Input
10 6
8 2
4 1
8 6
8 7
8 1
8 5
Output
7
Comments