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: from bisect import bisect_left, bisect_right
  from collections import Counter, defaultdict, deque, OrderedDict
  from copy import deepcopy
  from functools import lru_cache, reduce
  from math import ceil, floor
  from sys import setrecursionlimit
  
  import heapq
  import itertools
  import operator
  
  
  inf = float("inf")
  
  
  def get_int():
      return int(input())
  
  
  def get_float():
      return float(input())
  
  
  def get_str():
      return input().strip()
  
  
  def get_list_of_int():
      return [int(i) for i in input().split()]
  
  
  def get_list_of_float():
      return [float(f) for f in input().split()]
  
  
  def get_list_of_char():
      return list(input().strip())
  
  
  def get_data(n, order=None, **kwargs):
      if not order:
          order = range(len(kwargs))
      it = iter(order)
      var, fn = zip(*sorted(sorted(kwargs.items()), key=lambda _: next(it)))
  
      rows = []
      for _ in range(n):
          rows.append(input().split())
      columns = zip(*rows)
      exec(
          "global "
          + ", ".join(var)
          + "\n"
          + "\n".join(
              v + "=list(map(fn[{}], data[{}]))".format(i, i) for i, v in enumerate(var)
          ),
          globals(),
          {"fn": list(fn), "data": list(columns)},
      )
      return
  
  
  # inputs
  N, M = 0, 0
  A, B = [], []
  
  
  def set_inputs():
      global N, M, A, B
      N, M = get_list_of_int()
      get_data(M, A=int, B=int)
      return
  
  
  def main():
      setrecursionlimit(100000)
      set_inputs()
      s = "".join(list(map(lambda x: chr(ord("A") + x), A + B)))
      for i in range(N):
          print(s.count(chr(ord("A") + i + 1)))
      return
  
  
  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"}]