Problem:
Score : 400 points

Problem Statement

There are N persons called Person 1 through Person N.

You are given M facts that "Person A_i and Person B_i are friends." The same fact may be given multiple times.

If X and Y are friends, and Y and Z are friends, then X and Z are also friends. There is no friendship that cannot be derived from the M given facts.

Takahashi the evil wants to divide the N persons into some number of groups so that every person has no friend in his/her group.

At least how many groups does he need to make?

Constraints

2 \leq N \leq 2\times 10^5

0 \leq M \leq 2\times 10^5

1\leq A_i,B_i\leq N

A_i \neq B_i

Input

Input is given from Standard Input in the following format:

N M
A_1 B_1
\vdots
A_M B_M

Output

Print the answer.

Sample Input 1

5 3
1 2
3 4
5 1

Sample Output 1

3

Dividing them into three groups such as \{1,3\}, \{2,4\}, and \{5\} achieves the goal.

Sample Input 2

4 10
1 2
2 1
1 2
2 1
1 2
1 3
1 4
2 3
2 4
3 4

Sample Output 2

4

Sample Input 3

10 4
3 1
4 1
5 9
2 6

Sample Output 3

3

Solution in Rust (1.42.0) (judge verdict: Wrong Answer)

//【ライブラリここから】
// 1. 入力の容易化（https://qiita.com/tanakh/items/0ba42c7ca36cd29d0ac8）
macro_rules! input {
    (source = $s:expr, $($r:tt)*) => {
        let mut iter = $s.split_whitespace();
        let mut next = || { iter.next().unwrap() };
        input_inner!{next, $($r)*}
    };
    ($($r:tt)*) => {
        let stdin = std::io::stdin();
        let mut bytes = std::io::Read::bytes(std::io::BufReader::new(stdin.lock()));
        let mut next = move || -> String{
            bytes
                .by_ref()
                .map(|r|r.unwrap() as char)
                .skip_while(|c|c.is_whitespace())
                .take_while(|c|!c.is_whitespace())
                .collect()
        };
        input_inner!{next, $($r)*}
    };
}

macro_rules! input_inner {
    ($next:expr) => {};
    ($next:expr, ) => {};

    ($next:expr, $var:ident : $t:tt $($r:tt)*) => {
        let $var = read_value!($next, $t);
        input_inner!{$next $($r)*}
    };
}

macro_rules! read_value {
    ($next:expr, ( $($t:tt),* )) => {
        ( $(read_value!($next, $t)),* )
    };

    ($next:expr, [ $t:tt ; $len:expr ]) => {
        (0..$len).map(|_| read_value!($next, $t)).collect::<Vec<_>>()
    };

    ($next:expr, chars) => {
        read_value!($next, String).chars().collect::<Vec<char>>()
    };

    ($next:expr, usize1) => {
        read_value!($next, usize) - 1
    };

    ($next:expr, $t:ty) => {
        $next().parse::<$t>().expect("Parse error")
    };
}
//【ライブラリここまで】

fn main() {
    input! {n:usize, m:usize, ab:[usize; 2*m]};
    let mut friend_counts: Vec<i64> = vec![];
    let mut fp: Vec<usize> = Vec::<usize>::with_capacity(n);
    for _ in 0..n {
        fp.push(n);
    }
    for i in 0..ab.len() {
        if i % 2 == 0 {
            let a = ab[i] - 1;
            let b = ab[i + 1] - 1;
            if fp[a] < n && fp[b] < n {
                if fp[a] != fp[b] {
                    fp[a] = fp[b];
                    friend_counts[fp[a]] += friend_counts[fp[b]];
                }
            } else if fp[a] < n && fp[b] == n {
                fp[b] = fp[a];
                friend_counts[fp[a]] += 1;
            } else if fp[a] == n && fp[b] < n {
                fp[a] = fp[b];
                friend_counts[fp[b]] += 1;
            } else {
                // fp[a] == n && fp[b] == n
                friend_counts.push(2);
                fp[a] = friend_counts.len() - 1;
                fp[b] = fp[a]
            }
        }
    }
    let mut max_friends = 0;
    for p in fp {
        if p < n {
            let count = friend_counts[p];
            if count > max_friends {
                max_friends = count;
            }
        }
    }
    println!("{}", max_friends);
}