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

abm = [list(map(int,input().split())) for _ in range(m)]



countDic = {}



for nn in range(n+1):

	countDic[nn] = 0

	

for ab in abm:

	countDic[ab[0]] += 1

	countDic[ab[1]] += 1



ks = list(countDic.keys())

ks = sorted(ks)[1:]



for k in ks:

	print((countDic[k]))
n,m = list(map(int,input().split()))



ans = [0]*n

for _ in range(m):

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

	ans[a-1]+=1

	ans[b-1]+=1

	

for an in ans:

	print(an)
n, m = list(map(int, input().split()))
abm = [list(map(int, input().split())) for _ in range(m)]
countDic = {}
for nn in range(n + 1):
    countDic[nn] = 0
for ab in abm:
    countDic[ab[0]] += 1
    countDic[ab[1]] += 1
ks = list(countDic.keys())
ks = sorted(ks)[1:]
for k in ks:
    print((countDic[k]))

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

-abm = [list(map(int, input().split())) for _ in range(m)] -countDic = {} -for nn in range(n + 1): -    countDic[nn] = 0 -for ab in abm: -    countDic[ab[0]] += 1 -    countDic[ab[1]] += 1 -ks = list(countDic.keys()) -ks = sorted(ks)[1:] -for k in ks: -    print((countDic[k])) +ans = [0] * n +for _ in range(m): +    a, b = list(map(int, input().split())) +    ans[a - 1] += 1 +    ans[b - 1] += 1 +for an in ans: +    print(an)