import sys

import numpy as np

n,m = [int(x) for x in sys.stdin.readline().split()]

r = np.zeros(n)

for i in range(m):

	a, b = [int(x) for x in sys.stdin.readline().split()]

	r[a-1] += 1

	r[b-1] += 1

for i in range(n):

	print((int(r[i])))
import sys

n,m = [int(x) for x in sys.stdin.readline().split()]

r = [0]*n

for _ in range(m):

	a, b = [int(x) for x in sys.stdin.readline().split()]

	r[a-1] += 1

	r[b-1] += 1

for i in r:

	print(i)
import sys
import numpy as np

n, m = [int(x) for x in sys.stdin.readline().split()]
r = np.zeros(n)
for i in range(m):
    a, b = [int(x) for x in sys.stdin.readline().split()]
    r[a - 1] += 1
    r[b - 1] += 1
for i in range(n):
    print((int(r[i])))

import sys

n, m = [int(x) for x in sys.stdin.readline().split()]
r = [0] * n
for _ in range(m):
    a, b = [int(x) for x in sys.stdin.readline().split()]
    r[a - 1] += 1
    r[b - 1] += 1
for i in r:
    print(i)

-import numpy as np -r = np.zeros(n) -for i in range(m): +r = [0] * n +for _ in range(m): -for i in range(n): -    print((int(r[i]))) +for i in r: +    print(i)