

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

city = []

for i in range(n):

    city.append([i,0])



for i in range(m):

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

    city[a-1][1] += 1

    city[b-1][1] += 1



for j in range(n):

    print((city[j][1]))



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

s = [[0]*n for _ in range(n)]



for _ in range(m):

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

#    print(a,b)

    s[a-1][b-1] += 1

    s[b-1][a-1] += 1

#    print(s)



for i in range(n):

    print((sum(s[i])))



"""

以下の指定では、一度の値変更で、全ての要素の該当部分の数値が一斉に変わる。

http://delta114514.hatenablog.jp/entry/2018/01/02/233002

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

s = [[0]*n]*n

"""

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

n, m = list(map(int, input().split()))
s = [[0] * n for _ in range(n)]
for _ in range(m):
    a, b = list(map(int, input().split()))
    #    print(a,b)
    s[a - 1][b - 1] += 1
    s[b - 1][a - 1] += 1
#    print(s)
for i in range(n):
    print((sum(s[i])))
"""
以下の指定では、一度の値変更で、全ての要素の該当部分の数値が一斉に変わる。
http://delta114514.hatenablog.jp/entry/2018/01/02/233002
n,m = map(int,input().split())
s = [[0]*n]*n
"""

-city = [] +s = [[0] * n for _ in range(n)] +for _ in range(m): +    a, b = list(map(int, input().split())) +    #    print(a,b) +    s[a - 1][b - 1] += 1 +    s[b - 1][a - 1] += 1 +#    print(s) -    city.append([i, 0]) -for i in range(m): -    a, b = list(map(int, input().split())) -    city[a - 1][1] += 1 -    city[b - 1][1] += 1 -for j in range(n): -    print((city[j][1])) +    print((sum(s[i]))) +""" +以下の指定では、一度の値変更で、全ての要素の該当部分の数値が一斉に変わる。 +http://delta114514.hatenablog.jp/entry/2018/01/02/233002 +n,m = map(int,input().split()) +s = [[0]*n]*n +"""