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: Time Limit Exceeded)

//【ライブラリここから】
// 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 union_root: Vec<usize> = Vec::<usize>::with_capacity(n);
    for i in 0..n {
        union_root.push(i);
    }
    for i in 0..ab.len() {
        if i % 2 == 0 {
            let a = ab[i] - 1;
            let b = ab[i + 1] - 1;

            let mut r_a = a;
            let mut r_b = b;
            while union_root[r_a] != r_a {
                r_a = union_root[r_a];
            }
            while union_root[r_b] != r_b {
                r_b = union_root[r_b];
            }
            if union_root[r_a] == union_root[r_b] {
                continue;
            }
            union_root[r_b] = union_root[r_a];
        }
    }
    let mut count_list: Vec<i64> = Vec::<i64>::with_capacity(n);
    for _ in 0..n {
        count_list.push(0);
    }
    let mut max_friends = 0;
    for i in 0..union_root.len() {
        let mut j = i;
        while union_root[j] != j {
            j = union_root[j];
        }
        count_list[j] += 1;
    }
    for i in 0..count_list.len() {
        if count_list[i] > max_friends {
            max_friends = count_list[i];
        }
    }
    println!("{}", max_friends);
}