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

dp = [0] * n

for i in range(m):

    x, y = list(map(int, input().split()))

    dp[x - 1] += 1

    dp[y - 1] += 1

for i in range(n):

    print((dp[i]))
n, m = list(map(int, input().split()))

A = [0] * n

for i in range(m):

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

    A[a - 1] += 1

    A[b - 1] += 1

    

for i in range(n):

    print((A[i]))
n, m = list(map(int, input().split()))
dp = [0] * n
for i in range(m):
    x, y = list(map(int, input().split()))
    dp[x - 1] += 1
    dp[y - 1] += 1
for i in range(n):
    print((dp[i]))

n, m = list(map(int, input().split()))
A = [0] * n
for i in range(m):
    a, b = list(map(int, input().split()))
    A[a - 1] += 1
    A[b - 1] += 1
for i in range(n):
    print((A[i]))

-dp = [0] * n +A = [0] * n -    x, y = list(map(int, input().split())) -    dp[x - 1] += 1 -    dp[y - 1] += 1 +    a, b = list(map(int, input().split())) +    A[a - 1] += 1 +    A[b - 1] += 1 -    print((dp[i])) +    print((A[i]))