n, m = map(int, input().split())

ans = [0]*(n+1)



for _ in range(m):

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

    ans[a] += 1

    ans[b] += 1

#print(ans)

#print(ans[1:])

#unpack

print(*ans[1:], sep='\n')

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

a, b = [0]*M, [0]*M

for i in range(M):

    tmp_a, tmp_b = list(map(int, input().split()))

    a[i], b[i] = tmp_a, tmp_b

ab = list(zip(a,b))



# 添え字:都市,値:本数

num = [0]*(N+1)



for a_i, b_i in ab:

    num[a_i] += 1

    num[b_i] += 1



for i in range(len(num)):

    if i==0:

        continue

    else:

        print((num[i]))
n, m = map(int, input().split())
ans = [0] * (n + 1)
for _ in range(m):
    a, b = map(int, input().split())
    ans[a] += 1
    ans[b] += 1
# print(ans)
# print(ans[1:])
# unpack
print(*ans[1:], sep="\n")

N, M = list(map(int, input().split()))
a, b = [0] * M, [0] * M
for i in range(M):
    tmp_a, tmp_b = list(map(int, input().split()))
    a[i], b[i] = tmp_a, tmp_b
ab = list(zip(a, b))
# 添え字:都市,値:本数
num = [0] * (N + 1)
for a_i, b_i in ab:
    num[a_i] += 1
    num[b_i] += 1
for i in range(len(num)):
    if i == 0:
        continue
    else:
        print((num[i]))

-n, m = map(int, input().split()) -ans = [0] * (n + 1) -for _ in range(m): -    a, b = map(int, input().split()) -    ans[a] += 1 -    ans[b] += 1 -# print(ans) -# print(ans[1:]) -# unpack -print(*ans[1:], sep="\n") +N, M = list(map(int, input().split())) +a, b = [0] * M, [0] * M +for i in range(M): +    tmp_a, tmp_b = list(map(int, input().split())) +    a[i], b[i] = tmp_a, tmp_b +ab = list(zip(a, b)) +# 添え字:都市,値:本数 +num = [0] * (N + 1) +for a_i, b_i in ab: +    num[a_i] += 1 +    num[b_i] += 1 +for i in range(len(num)): +    if i == 0: +        continue +    else: +        print((num[i]))