Traffic lights
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
In the cave there are m tunnels and n junctions, each tunnel connects two crossroads. Mouse King decided to install the traffic light in every tunnel before every intersection. Write a program to calculate how many traffic lights must be installed on each intersection. Intersections are numbered from 1 to n.
Input
The first line contains two numbers n and m (0 < n ≤ 100, 0 ≤ m ≤ n ·(n - 1) / 2). The following m lines contain two integers i and j (1 ≤ i, j ≤ n), which means that the intersections i and j are connected with a tunnel.
Output
Print n numbers: k-th number indicates the number of traffic signals at the k-th intersection.
We can assume that any two crossing connected by no more than one tunnel. No tunnels from the intersection i to him.
Examples
Input #1
Answer #1
Submissions 7K
Acceptance rate 64%