#abc061b. [abc061_b]Counting Roads
[abc061_b]Counting Roads
Problem Statement
There are cities and roads. The -th road connects two cities and bidirectionally. There may be more than one road that connects the same pair of two cities. For each city, how many roads are connected to the city?
Constraints
- All input values are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer in lines. In the -th line , print the number of roads connected to city .
Sample Input 1
4 3
1 2
2 3
1 4
Sample Output 1
2
2
1
1
- City is connected to the -st and -rd roads.
- City is connected to the -st and -nd roads.
- City is connected to the -nd road.
- City is connected to the -rd road.
Sample Input 2
2 5
1 2
2 1
1 2
2 1
1 2
Sample Output 2
5
5
Sample Input 3
8 8
1 2
3 4
1 5
2 8
3 7
5 2
4 1
6 8
Sample Output 3
3
3
2
2
2
1
1
2