ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Camp. Turkey > задача:


Nameplates

Задачи сборника

• A+B
• Herons
• Workshop
• City Tour
• A Palace with Many Columns
• Nameplates
• Cycle detection
• Cities and roads
• Adjacency matrix to edges list
• Edges list to Adjacency matrix
• Permutations
• Reverse permutation
• Divisors count
• GCD of ones

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 1000/1000/1000/1000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

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