import numpy as np



ncity, nlines = list(map(int, input().rstrip("\n").split()))

matrix = np.zeros((ncity, ncity), dtype=int)

for _ in range(nlines):

    l, c = [int(x) - 1 for x in input().rstrip("\n").split()]

    matrix[l][c] += 1

    matrix[c][l] += 1



for list_ in matrix:

    print((sum(list_)))
n, m = map(int, input().split())

roads = [0] * n

[exec("roads[%d] += 1; roads[%d] += 1" % tuple(map(lambda c: int(c) - 1, input().split()))) for _ in range(m)]

print(*roads, sep="\n", end="")

import numpy as np

ncity, nlines = list(map(int, input().rstrip("\n").split()))
matrix = np.zeros((ncity, ncity), dtype=int)
for _ in range(nlines):
    l, c = [int(x) - 1 for x in input().rstrip("\n").split()]
    matrix[l][c] += 1
    matrix[c][l] += 1
for list_ in matrix:
    print((sum(list_)))

n, m = map(int, input().split())
roads = [0] * n
[
    exec(
        "roads[%d] += 1; roads[%d] += 1"
        % tuple(map(lambda c: int(c) - 1, input().split()))
    )
    for _ in range(m)
]
print(*roads, sep="\n", end="")

-import numpy as np - -ncity, nlines = list(map(int, input().rstrip("\n").split())) -matrix = np.zeros((ncity, ncity), dtype=int) -for _ in range(nlines): -    l, c = [int(x) - 1 for x in input().rstrip("\n").split()] -    matrix[l][c] += 1 -    matrix[c][l] += 1 -for list_ in matrix: -    print((sum(list_))) +n, m = map(int, input().split()) +roads = [0] * n +[ +    exec( +        "roads[%d] += 1; roads[%d] += 1" +        % tuple(map(lambda c: int(c) - 1, input().split())) +    ) +    for _ in range(m) +] +print(*roads, sep="\n", end="")