from collections import Counter

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

L=[0]*(2*m)

for i in range(m):

    L[2*i],L[2*i+1]=list(map(int,input().split()))

s=Counter(L)

for i in range(n):

    print((s[i+1]))
n,m=map(int,input().split())

ans=[0]*n

for _ in range(m):

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

    ans[a-1] += 1

    ans[b-1] += 1

print(*ans, sep="\n")

from collections import Counter

n, m = list(map(int, input().split()))
L = [0] * (2 * m)
for i in range(m):
    L[2 * i], L[2 * i + 1] = list(map(int, input().split()))
s = Counter(L)
for i in range(n):
    print((s[i + 1]))

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

-from collections import Counter - -n, m = list(map(int, input().split())) -L = [0] * (2 * m) -for i in range(m): -    L[2 * i], L[2 * i + 1] = list(map(int, input().split())) -s = Counter(L) -for i in range(n): -    print((s[i + 1])) +n, m = map(int, input().split()) +ans = [0] * n +for _ in range(m): +    a, b = map(int, input().split()) +    ans[a - 1] += 1 +    ans[b - 1] += 1 +print(*ans, sep="\n")