from collections import defaultdict

N, M = list(map(int, input().split()))

city_road_nums = defaultdict(int)



for _ in range(M):

    a, b = list(map(int, input().split()))

    city_road_nums[a] += 1

    city_road_nums[b] += 1



for i in range(1, N+1):

    print((city_road_nums[i]))

N, M = list(map(int, input().split()))

ABs = [input().split() for i in range(M)]

 

 

MPs = {}

for a, b in ABs:

    a = int(a)

    b = int(b)

    if a not in MPs:

        MPs[a] = 1

    else:

        MPs[a] += 1

    if b not in MPs:

        MPs[b] = 1

    else:

        MPs[b] += 1

 

for mp in range(1, N+1):

    if mp not in MPs:

        MPs[mp] = '0'

 

for _, y in sorted(MPs.items()):

    print(y)
from collections import defaultdict

N, M = list(map(int, input().split()))
city_road_nums = defaultdict(int)
for _ in range(M):
    a, b = list(map(int, input().split()))
    city_road_nums[a] += 1
    city_road_nums[b] += 1
for i in range(1, N + 1):
    print((city_road_nums[i]))

N, M = list(map(int, input().split()))
ABs = [input().split() for i in range(M)]
MPs = {}
for a, b in ABs:
    a = int(a)
    b = int(b)
    if a not in MPs:
        MPs[a] = 1
    else:
        MPs[a] += 1
    if b not in MPs:
        MPs[b] = 1
    else:
        MPs[b] += 1
for mp in range(1, N + 1):
    if mp not in MPs:
        MPs[mp] = "0"
for _, y in sorted(MPs.items()):
    print(y)

-from collections import defaultdict - -city_road_nums = defaultdict(int) -for _ in range(M): -    a, b = list(map(int, input().split())) -    city_road_nums[a] += 1 -    city_road_nums[b] += 1 -for i in range(1, N + 1): -    print((city_road_nums[i])) +ABs = [input().split() for i in range(M)] +MPs = {} +for a, b in ABs: +    a = int(a) +    b = int(b) +    if a not in MPs: +        MPs[a] = 1 +    else: +        MPs[a] += 1 +    if b not in MPs: +        MPs[b] = 1 +    else: +        MPs[b] += 1 +for mp in range(1, N + 1): +    if mp not in MPs: +        MPs[mp] = "0" +for _, y in sorted(MPs.items()): +    print(y)