HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Sections > Unsorted > problem:


Nameplates

Section problems

• Sum of N numbers
• The N Queens Problem
• Subsets
• Maximum Sum 2
• Gifts of Santa Claus
• Rectangles on a plane
• Permutations
• Reverse permutation
• Nameplates
• Adjacency matrix to edges list
• Edges list to Adjacency matrix
• Cities and roads
• Cycle detection
• Diameter of graph
• Divisors count
• GCD of ones
• Prime numbers

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 1000/1000/1000/1000 ms. Memory limit 65000/65000/65000/65000 Kb.

Problem description

There are N cities and M roads between them in some country. In each city goverment wants to put a nameplate at the begining of each road (from both sides), which shows where the road leads (which city). According to the map given calculate how many nameplates are required for each city.

Input

The first line of the input contains two integers N and M (1 ≤ N ≤ 100, 0 ≤ M < 10000) where N denotes the number of cities, M - number of roads. Each of the following M lines contains two integers - numbers of cities connected with roads.

Output

Print N integers - number of nameplates required for each city.

Example

stdin stdout

7 10
5 1
3 2
7 1
5 2
7 4
6 5
6 4
7 5
2 1
5 3

3 3 2 2 5 2 3

Для отправки решений необходимо выполнить вход.

www.contester.ru