PROGRAMMING:friend
[problem description]
Students should learn to make more good friends. Friendship is mutual. If a is B's good friend, then B is also a
My good friend. A is a good friend of B, B is a good friend of C, but a and C are not necessarily friends
good friend. Now, given the friend relationship between some primary school students, please program to count the number of good friends who have the most friends
Friends**
[input data]
Enter a total of M + 1 rows.
The first line is two integers n and m, which respectively represent the total number of students and the logarithm of friends.
Lines 2 to m + 1 describe the relationship between M and friends. Two students' names separated by a single space in each line.
**Each person's name is only composed of small letters, and 1 ≤ the length of the name ≤ 10**
[output data]
An integer indicating how many good friends the person with the most friends has.
[input and output example 1]
4 3
lucy lily
jam lily
jam peter
two
**[explanation of example 1]**
Four people, three pairs of friends.
Lucy has only one friend, lily;
Jim has two friends, Lily and Peter;
Lily has two friends, Lucy and jam;
Peter has only one friend, jam.
So Lily and jam have two friends at most.
**
[input and output example 2]**
6 5
andy bob
bella andy
bob andy
andy cassie
cassie bob
three
[example 2 explanation]
Six people, five pairs of friends. The first pair of friends is "Andy Bob" and the third pair is "Bob Andy"
Repeat.
Andy has three friends, Bob, Bella and Cassie;
Bob has two friends, Andy and Cassie;
Bella has only one friend, Andy;
Cassie has two friends, Bob and Andy;
The other two had no friends (the two did not appear in the input).
So Andy has the most friends, three.
[data range agreement]
More than 50% of the test points input data to ensure that the friend relationship is not repeated.
100% of the test points input data to ensure that 2 ≤ n ≤ 100, 1 ≤ m ≤ 1000, * *, and do not have their own friends**< br>
answer:If there is no answer, please comment
Students should learn to make more good friends. Friendship is mutual. If a is B's good friend, then B is also a
My good friend. A is a good friend of B, B is a good friend of C, but a and C are not necessarily friends
good friend. Now, given the friend relationship between some primary school students, please program to count the number of good friends who have the most friends
Friends**
[input data]
Enter a total of M + 1 rows.
The first line is two integers n and m, which respectively represent the total number of students and the logarithm of friends.
Lines 2 to m + 1 describe the relationship between M and friends. Two students' names separated by a single space in each line.
**Each person's name is only composed of small letters, and 1 ≤ the length of the name ≤ 10**
[output data]
An integer indicating how many good friends the person with the most friends has.
[input and output example 1]
4 3
lucy lily
jam lily
jam peter
two
**[explanation of example 1]**
Four people, three pairs of friends.
Lucy has only one friend, lily;
Jim has two friends, Lily and Peter;
Lily has two friends, Lucy and jam;
Peter has only one friend, jam.
So Lily and jam have two friends at most.
**
[input and output example 2]**
6 5
andy bob
bella andy
bob andy
andy cassie
cassie bob
three
[example 2 explanation]
Six people, five pairs of friends. The first pair of friends is "Andy Bob" and the third pair is "Bob Andy"
Repeat.
Andy has three friends, Bob, Bella and Cassie;
Bob has two friends, Andy and Cassie;
Bella has only one friend, Andy;
Cassie has two friends, Bob and Andy;
The other two had no friends (the two did not appear in the input).
So Andy has the most friends, three.
[data range agreement]
More than 50% of the test points input data to ensure that the friend relationship is not repeated.
100% of the test points input data to ensure that 2 ≤ n ≤ 100, 1 ≤ m ≤ 1000, * *, and do not have their own friends**< br>
answer:If there is no answer, please comment