output_description: Print the answer in N lines. In the i-th line (1≤i≤N), print the number of
  roads connected to city i.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N M
      a_1 b_1
      :  
      a_M b_M
attempt: import sys, re
  from math import ceil, floor, sqrt, pi, factorial, gcd
  from copy import deepcopy
  from collections import Counter, deque
  from heapq import heapify, heappop, heappush
  from itertools import accumulate, product, combinations, combinations_with_replacement
  from bisect import bisect, bisect_left, bisect_right
  from functools import reduce
  from decimal import Decimal, getcontext
  
  
  # input = sys.stdin.readline
  def i_input():
      return int(input())
  
  
  def i_map():
      return map(int, input().split())
  
  
  def i_list():
      return list(i_map())
  
  
  def i_row(N):
      return [i_input() for _ in range(N)]
  
  
  def i_row_list(N):
      return [i_list() for _ in range(N)]
  
  
  def s_input():
      return input()
  
  
  def s_map():
      return input().split()
  
  
  def s_list():
      return list(s_map())
  
  
  def s_row(N):
      return [s_input for _ in range(N)]
  
  
  def s_row_str(N):
      return [s_list() for _ in range(N)]
  
  
  def s_row_list(N):
      return [list(s_input()) for _ in range(N)]
  
  
  def lcm(a, b):
      return a * b // gcd(a, b)
  
  
  sys.setrecursionlimit(10**6)
  INF = float("inf")
  MOD = 10**9 + 7
  num_list = []
  str_list = []
  
  
  def main():
      n, m = i_map()
      for _ in range(m):
          a, b = i_map()
          num_list.append(a)
          num_list.append(b)
  
      num_counter = Counter(num_list)
  
      for i in range(1, n + 1):
          print(num_counter[i])
  
  
  if __name__ == "__main__":
      main()
  
problem_description: Statement
  
  There are N cities and M roads. The i-th road (1≤i≤M) connects two cities a_i
  and b_i (1≤a_i,b_i≤N) bidirectionally. There may be more than one road that
  connects the same pair of two cities. For each city, how many roads are
  connected to the city?
samples: [{"input": "4 3\n    1 2\n    2 3\n    1 4", "output": "2\n    2\n    1\n    1\n    \n\n  * City 1 is connected to the 1-st and 3-rd roads.\n  * City 2 is connected to the 1-st and 2-nd roads.\n  * City 3 is connected to the 2-nd road.\n  * City 4 is connected to the 3-rd road.\n\n* * *"}, {"input": "2 5\n    1 2\n    2 1\n    1 2\n    2 1\n    1 2", "output": "5\n    5\n    \n\n* * *"}, {"input": "8 8\n    1 2\n    3 4\n    1 5\n    2 8\n    3 7\n    5 2\n    4 1\n    6 8", "output": "3\n    3\n    2\n    2\n    2\n    1\n    1\n    2"}]