local read = io.read

local N, M = read("*n", "*n")
local load_s = {}
for i = 1, N do
	load_s[i] = 0
end

for i = 1, 2 * M do
	local ab_i = read("*n")
	load_s[ab_i] = load_s[ab_i] + 1
end

print(table.concat(load_s, "\n"))
