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?

-----Constraints-----
 - 2≤N,M≤50
 - 1≤a_i,b_i≤N
 - a_i ≠ b_i
 - All input values are integers.

-----Input-----
Input is given from Standard Input in the following format:  
N M
a_1 b_1
:  
a_M b_M

-----Output-----
Print the answer in N lines.
In the i-th line (1≤i≤N), print the number of roads connected to city i.

-----Sample Input-----
4 3
1 2
2 3
1 4

-----Sample Output-----
2
2
1
1

 - City 1 is connected to the 1-st and 3-rd roads.
 - City 2 is connected to the 1-st and 2-nd roads.
 - City 3 is connected to the 2-nd road.
 - City 4 is connected to the 3-rd road.
[{"code": "n,m = map(int, input().split())\nc = [0 for _ in range(n)]\nfor i in range(m):\n  a,b = map(int, input().split())\n  c[a-1] += 1\n  c[b-1] += 1\nfor j in range(n):\n  print(c[j])", "passed": true, "time": 0.25, "memory": 14152.0, "status": "done"}, {"code": "n,m = [int(x) for x in input().split()]\ncount = [0] * (n+1)\nfor i in range(m):\n  a,b = [int(x) for x in input().split()]\n  count[a] += 1\n  count[b] += 1\nfor i in range(1,n+1):\n  print(count[i])", "passed": true, "time": 0.25, "memory": 14220.0, "status": "done"}, {"code": "#-*-coding:utf-8-*-\nimport sys\ninput=sys.stdin.readline\n\ndef main2():\n    numbers=[]\n    n,m = map(int,input().split())\n    numbers=[list(map(int,input().split())) for _ in range(m)]\n    dp=[0]*n\n    for number in numbers:\n        for n in number:\n            dp[n-1]+=1\n    for ans in dp:\n        print(ans)\n\ndef main():\n    numbers=[]\n    n,m = map(int,input().split())\n    numbers=[list(map(int,input().split())) for _ in range(m)]\n    dp={}\n    for number in numbers:\n        for n in number:\n            if n not in dp:\n                dp[n]=1\n            else:\n                dp[n]+=1\n    print(dp)\n    for i in range(1,len(dp)+1):\n        print(dp[i])\n\ndef __starting_point():\n    main2()\n__starting_point()", "passed": true, "time": 0.25, "memory": 14280.0, "status": "done"}, {"code": "n,m = list(map(int, input().split()))\ng = [[] for _ in range(n)]\n\nfor i in range(m):\n    a,b = list(map(int, input().split()))\n    g[a-1].append( b-1)\n    g[b-1].append( a-1)\n            \nfor nd in g:\n    print((len(nd)))\n\n", "passed": true, "time": 0.24, "memory": 14228.0, "status": "done"}, {"code": "n,m = map(int, input().split())\na = [0] * m\nb = [0] * m\nfor i in range(m):\n    a[i], b[i] = map(int, input().split())\nfor i in range(n):\n    print((a+b).count(i+1))", "passed": true, "time": 0.14, "memory": 14172.0, "status": "done"}, {"code": "n, m = list(map(int, input().split()))\nAB = [[] for _ in range(n)]\nfor i in range(m):\n    a, b = [int(x)-1 for x in input().split()]\n    AB[a].append(b)\n    AB[b].append(a)\nfor i in range(n):\n    print((len(AB[i])))\n", "passed": true, "time": 0.19, "memory": 14208.0, "status": "done"}, {"code": "n,m=map(int,input().split())\na=[]\nfor i in range(m):\n    x,y=map(int,input().split())\n    a.append(x)\n    a.append(y)\nfor i in range(1,n+1):\n    print(a.count(i))", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "n,m = map(int,input().split())\nans = []\nfor i in range(m):\n    a,b = map(int,input().split())\n    ans.append(a)\n    ans.append(b)\n\nfor j in range(1,n+1):\n    print(ans.count(j))", "passed": true, "time": 1.68, "memory": 14200.0, "status": "done"}, {"code": "n,m=list(map(int,input().split()))\nal=[]\nbl=[]\nfor i in range(m):\n  a,b=list(map(int,input().split()))\n  al.append(a)\n  bl.append(b)\n\nfor i in range(1,n+1):\n  print((al.count(i)+bl.count(i)))\n", "passed": true, "time": 1.9, "memory": 14204.0, "status": "done"}, {"code": "N, M = map(int, input().split())\nroad_list = []\nfor i in range(M):\n  road_list.append(list(map(int, input().split())))\n\nroad_dict = {}\nfor road in road_list:\n  first_city = road[0]\n  second_city = road[1]\n  first_city_road_list = road_dict.get(first_city, [])\n  first_city_road_list.append(second_city)\n  road_dict[first_city] = first_city_road_list\n  \n  second_city_road_list = road_dict.get(second_city, [])\n  second_city_road_list.append(first_city)\n  road_dict[second_city] = second_city_road_list\n\nfor i in range(1, N+1):\n  city_road_list = road_dict.get(i, [])\n  road_num = len(city_road_list) if city_road_list != [] else 0\n  print(road_num)", "passed": true, "time": 0.21, "memory": 14124.0, "status": "done"}, {"code": "n,m = map(int,input().split())\nli1 = [0]*n\nfor i in range(m):\n    a,b = map(int,input().split())\n    li1[a-1] += 1\n    li1[b-1] += 1\nfor i in range(n):\n    print(li1[i])", "passed": true, "time": 0.22, "memory": 14244.0, "status": "done"}, {"code": "n, m = list(map(int, input().split()))\ncounter_list = [0] * (n + 1)\nfor i in range(m):\n    a, b = list(map(int, input().split()))\n    counter_list[a] += 1\n    counter_list[b] += 1\n\nfor i in range(1, n + 1):\n    print((counter_list[i]))\n", "passed": true, "time": 0.23, "memory": 14212.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nc = []\nfor _ in range(m):\n    a, b = map(str, input().split())\n    c.append(a)\n    c.append(b)\nfor i in range(1, n + 1):\n    print(c.count(str(i)))", "passed": true, "time": 0.22, "memory": 14136.0, "status": "done"}, {"code": "N,M = list(map(int,input().split()))\nL = [0] * (N+1)\nfor i in range(M):\n  A,B = list(map(int,input().split()))\n  L[A] += 1\n  L[B] += 1\nfor j in range(1,N+1):\n  print((L[j]))\n", "passed": true, "time": 0.2, "memory": 14112.0, "status": "done"}, {"code": "n,m = map(int,input().split())\ndata = [input().split() for i in range(m)]\nfor i in range(1,n+1):\n    count = 0\n    for j in range(m):\n        if int(data[j][0]) == i or int(data[j][1]) == i:\n            count += 1\n    print(count)", "passed": true, "time": 0.14, "memory": 14284.0, "status": "done"}, {"code": "N, M = tuple(map(int, input().split()))\n\ncount_road = [0 for _ in range(N+1)]\n\nfor _ in range(M):\n    a, b = tuple(map(int, input().split()))\n    count_road[a] += 1\n    count_road[b] += 1\n    \nfor i in range(1, N+1):\n    print(count_road[i])", "passed": true, "time": 0.15, "memory": 14272.0, "status": "done"}, {"code": "n, m = list(map(int, input().split()))\narr = [0] * n\n\nfor _ in range(m):\n    x, y = list(map(int, input().split()))\n    arr[x - 1] += 1\n    arr[y - 1] += 1\n\nfor ele in arr:\n    print(ele)\n", "passed": true, "time": 0.14, "memory": 14200.0, "status": "done"}, {"code": "N, M=map(int, input().split())\nnums=[0]*(N+1)\nfor _ in range(M):\n  a, b=map(int, input().split())\n  nums[a]+=1\n  nums[b]+=1\nprint(*nums[1:], sep='\\n')", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n, m = list(map(int, input().split()))\nans = [0]*n\n\nfor _ in range(m):\n    a, b, = list(map(int, input().split()))\n    ans[a-1] += 1\n    ans[b-1] += 1\n\nfor i in range(n):\n    print((ans[i]))\n", "passed": true, "time": 0.14, "memory": 14100.0, "status": "done"}, {"code": "N, M = list(map(int, input().split()))\na_s = []\nb_s = []\nfor i in range(M):\n\ta, b = list(map(int, input().split()))\n\ta_s.append(a)\n\tb_s.append(b)\n\nfor i in range(1, N + 1):\n\tprint((a_s.count(i) + b_s.count(i)))\n", "passed": true, "time": 0.14, "memory": 14356.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nnum = []\nfor i in range(m):\n    a, b = map(int, input().split())\n    num.append(a)\n    num.append(b)\n\nfor i in range(n):\n    print(num.count(i + 1))", "passed": true, "time": 0.14, "memory": 14184.0, "status": "done"}, {"code": "N,M = list(map(int,input().split()))\nli = []\nfor _ in range(M):\n  li += input().split()\nfor i in range(1,N+1):\n  print((li.count(str(i))))\n", "passed": true, "time": 0.14, "memory": 14240.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nl = []\nfor i in range(m):\n\ta,b = map(int, input().split())\n\tl.append(a)\n\tl.append(b)\nfor i in range(n):\n\tt = i + 1\n\tans = l.count(t)\n\tprint(ans)", "passed": true, "time": 0.14, "memory": 14088.0, "status": "done"}, {"code": "n,m=map(int,input().split())\nroads=[0 for _ in range(n)]\nfor _ in range(m):\n    a,b=map(int,input().split())\n    roads[a-1]+=1\n    roads[b-1]+=1\nfor i in roads:\n    print(i)", "passed": true, "time": 0.23, "memory": 14260.0, "status": "done"}, {"code": "N,M = map(int,input().split())\ncity = [0] * N\n\nfor _ in range(M):\n  a,b = map(int,input().split())\n  city[a-1] += 1\n  city[b-1] += 1\n  \nfor ans in city:\n  print(ans)", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "N,M=map(int,input().split())\ncity=[0]*N\nfor i in range(M):\n  road=list(map(int,input().split()))\n  for j in road:\n    city[j-1]+=1\nfor i in city:\n  print(i)", "passed": true, "time": 0.14, "memory": 14260.0, "status": "done"}, {"code": "n, m = map(int, input().split())\na = []\nfor i in range(m):\n  x, y = map(int, input().split())\n  a.append(x)\n  a.append(y)\nfor i in range(1, n + 1):\n  print(a.count(i))", "passed": true, "time": 0.14, "memory": 14024.0, "status": "done"}, {"code": "import itertools\n\nN, M = list(map(int, input().split()))\n\nres = []\n\nfor i in range(M):\n    ab = list(map(int, input().split()))\n    res.append(ab)\n\nres = list(itertools.chain.from_iterable(res))\n\nfor i in range(N):\n    print((res.count(i+1)))\n", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "lst1 = input().split()\n\nN = int(lst1[0])\nM = int(lst1[1])\n\nlst2 = []\n\nfor i in range(M):\n   lst2.append(input().split())\n\nlst3 = []\nfor i in range(N):\n   lst3.append(0)\n\nfor i in range(M):\n   for j in range(2):\n      lst3[ int(lst2[i][j]) - 1 ] += 1\n\nfor i in range(N):\n   print(lst3[i])", "passed": true, "time": 0.23, "memory": 14076.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nedge = [[] for _ in range(n)]\nfor _ in range(m):\n    a, b = map(int, input().split())\n    edge[a-1].append(b-1)\n    edge[b-1].append(a-1)\nprint(\"\\n\".join(list(map(lambda x:str(len(x)), edge))))", "passed": true, "time": 0.21, "memory": 14268.0, "status": "done"}, {"code": "n,m=map(int,input().split())\nA=[]\nB=[]\nfor i in range(m):\n    a,b=map(int,input().split())\n    A.append(a)\n    B.append(b)\nfor j in range(n):\n    print(A.count(j+1)+B.count(j+1))", "passed": true, "time": 0.15, "memory": 14364.0, "status": "done"}, {"code": "n,m=map(int,input().split())\nL=[[0 for _ in range(n)] for _ in range(n)]\nfor _ in range(m):\n    a,b=map(int,input().split())\n    L[a-1][b-1]+=1\n    L[b-1][a-1]+=1\nfor i in range(n):\n    print(sum(L[i]))", "passed": true, "time": 0.14, "memory": 14248.0, "status": "done"}, {"code": "#n = int(input())\nn, m = list(map(int, input().split()))\n#l = list(map(int,input().split()))\n#l = [list(map(int,input().split())) for i in range(n)]\ndic = {i: 0 for i in range(1, n+1)}\nfor i in range(m):\n    a, b = list(map(int, input().split()))\n    dic[a] = dic[a]+1\n    dic[b] = dic[b]+1\n\nfor i in range(1, n+1):\n    print((dic[i]))\n", "passed": true, "time": 0.31, "memory": 14156.0, "status": "done"}, {"code": "N,M =map(int,input().split())\nnums =[0]*N\nfor i in range(M):\n    a, b = map(int, input().split())\n    nums[a-1] += 1\n    nums[b-1] += 1\n\nfor ans in nums:\n    print(ans)", "passed": true, "time": 0.21, "memory": 14212.0, "status": "done"}, {"code": "n,m = map(int,input().split())\nans = [0]*n\nfor i in range(m):\n  a,b = map(int,input().split())\n  ans[a-1] += 1\n  ans[b-1] += 1\nfor i in range(n):\n  print(ans[i])", "passed": true, "time": 0.14, "memory": 14152.0, "status": "done"}, {"code": "def actual(N, M, A, B):\n    AB = A + B\n\n    counts = [AB.count(i) for i in range(1, N + 1)]\n    \n    return '\\n'.join(map(str, counts))\n\nN, M = list(map(int, input().split()))\nA, B = [], []\nfor _ in range(M):\n  a, b = list(map(int, input().split()))\n  A.append(a)\n  B.append(b)\n  \nprint((actual(N, M, A, B)))\n", "passed": true, "time": 0.18, "memory": 14372.0, "status": "done"}, {"code": "n, m = map(int, input().split())\ncount = [0] * n\nfor i in range(m):\n    a, b = map(int, input().split())\n    count[a-1] += 1\n    count[b-1] += 1\nfor i in range(n):\n    print(count[i])", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "n,m=map(int,input().split())\nd=[0]*n\nfor i in range(m):\n  a,b=map(int,input().split())\n  d[a-1]+=1\n  d[b-1]+=1\nfor i in d:\n  print(i)", "passed": true, "time": 0.55, "memory": 14112.0, "status": "done"}, {"code": "c, r = [int(x) for x in input().split()]\ntotal = [0] * c\nfor i in range(r):\n    f, s = [int(x) for x in input().split()]\n    total[f - 1] += 1\n    total[s - 1] += 1\n\nfor number in total:\n    print(number)\n    \n", "passed": true, "time": 0.14, "memory": 14148.0, "status": "done"}, {"code": "N, M = list(map(int, input().split()))\ndata = [[] for _ in range(N + 1)]\nfor i in range(M):\n    x, y = list(map(int, input().split()))\n    data[x].append(y)\n    data[y].append(x)\n\nfor i in range(1, N + 1):\n    print((len(data[i])))\n", "passed": true, "time": 0.23, "memory": 14236.0, "status": "done"}, {"code": "from typing import List\n\n\ndef answer(n: int, m: int, ab_s: List[List[int]]) -> List[int]:\n    roads = [0 for _ in range(n)]\n    for ab in ab_s:\n        a, b = ab\n        roads[a - 1] += 1\n        roads[b - 1] += 1\n\n    return roads\n\n\ndef main():\n    n, m = map(int, input().split())\n    ab_s = [list(map(int, input().split())) for _ in range(m)]\n    for i in answer(n, m, ab_s):\n        print(i)\n\n\ndef __starting_point():\n    main()\n__starting_point()", "passed": true, "time": 0.15, "memory": 15192.0, "status": "done"}, {"code": "n, m = map(int, input().split())\ncount = [0]*n\n##print(count)\nfor i in range(m):\n    a, b = map(int, input().split())\n    count[a-1]+=1\n    count[b-1]+=1\n    ##print(count)\nfor i in count:\n    print(i)", "passed": true, "time": 0.14, "memory": 14208.0, "status": "done"}, {"code": "N,M=map(int,input().split())\nx=[0]*(N+1)\nfor i in range(M) :\n  a,b=map(int,input().split())\n  for j in range(1,N+1) :\n    if a==j or b==j :\n      x[j]+=1\nfor i in range(1,N+1) :\n  print(x[i])", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "n,m = map(int,input().split())\nans = [0]*n\nfor _ in range(m):\n    a,b = map(int,input().split())\n    ans[a-1] += 1\n    ans[b-1] += 1\nfor i in range(n):\n    print(ans[i])", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "n,m = map(int,input().split())\nl = [0]*n\nfor i in range(m):\n    a,b = map(int,input().split())\n    l[a-1] +=1\n    l[b-1] +=1\nfor i in l:\n    print(i)", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "n , m = map(int, input().split())\nab = [list(map(int, input().split())) for _ in range(m)]\nans = []\nfor i in range(n):\n    cnt = 0\n    for j in range(m):\n        if ab[j][0] == i+1 or ab[j][1] == i+1:\n            cnt += 1\n    ans.append(cnt)\nfor k in range(n):\n    print(ans[k])", "passed": true, "time": 0.15, "memory": 14056.0, "status": "done"}, {"code": "n,m = map(int, input().split())\n\nl=[]\n\nfor i in range(m):\n    a,b = map(int, input().split())\n    l.append(a)\n    l.append(b)\n    \nfor i in range(n):\n    print(l.count(i+1))", "passed": true, "time": 0.14, "memory": 14080.0, "status": "done"}, {"code": "n, m = map(int, input().split())\n\nar = [0] * n\n\nfor i in range(m):\n  a, b = map(int, input().split())\n  ar[a-1] += 1\n  ar[b-1] += 1\nfor i in range(n):\n  print(ar[i])", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "\n\nN, M = map(int, input().split())\ntree = [[] for _ in range(N)]\nfor i in range(M):\n    a, b = map(int, input().split())\n    a -= 1\n    b -= 1\n    tree[a].append(b)\n    tree[b].append(a)\n\nfor i in range(N):\n    print(len(tree[i]))", "passed": true, "time": 0.15, "memory": 14072.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nroad_list = []\n\nfor _ in range(m):\n    a, b = (input().split())\n    road_list.append(a)\n    road_list.append(b)\n    \nfor i in range(1, n + 1):\n  print(road_list.count(str(i)))", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n,m=list(map(int,input().split()))\na_s=[]\nb_s=[]\nfor i in range(m):\n  a,b=list(map(int,input().split()))\n  a_s.append(a)\n  b_s.append(b)\n\nfor i in range(1,n+1):\n  print((a_s.count(i)+b_s.count(i)))\n", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "# -*- coding: utf-8 -*-\n\nN,M = map(int, input().split())\nload_num = [0] * N\nfor i in range(M):\n    a, b = map(int, input().split())\n    load_num[a-1] += 1\n    load_num[b-1] += 1\n\nfor i in range(N):\n    print(load_num[i])", "passed": true, "time": 0.14, "memory": 14060.0, "status": "done"}, {"code": "n,m=map(int,input().split())\nc={i:0 for i in range(1,n+1)}\nfor a,b in [list(map(int,input().split())) for i in range(m)]:\n  c[a]+=1;c[b]+=1\nprint(*c.values(),sep='\\n')", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "N, M = map(int, input().split())\nL = [0] * N\nfor i in range(M):\n  a, b = map(int, input().split())\n  L[a-1] += 1\n  L[b-1] += 1\nprint(*L, sep = \"\\n\")", "passed": true, "time": 0.14, "memory": 14108.0, "status": "done"}, {"code": "\nN, M = list(map(int, input().split()))\n# \u90fd\u5e02A\u3068\u90fd\u5e02B\u3092\u7d50\u3076\u8def\u7ddaM\nA_B = [list(map(int, input().split())) for _ in range(M)]\nans = [0] * N\n\nfor a, b in A_B:\n    ans[a-1] += 1\n    ans[b-1] += 1\nfor a in ans:\n    print(a)\n", "passed": true, "time": 0.23, "memory": 14120.0, "status": "done"}, {"code": "N,M = list(map(int,input().split()))\nAB = [list(map(int,input().split())) for _ in range(M)]\n\nWAY = [0] * (N+1)\nfor a,b in AB:\n  WAY[a] += 1\n  WAY[b] += 1\n  \nprint((\"\\n\".join(map(str,WAY[1:]))))\n  \n", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "import itertools\nn,m = map(int,input().split())\nli = [list(map(int,input().split())) for i in range(m)]\n#print(li)\nlis = list(itertools.chain.from_iterable(li))\n#print(lis)\nfor i in range(1,n+1):\n    print(lis.count(i))", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "n, m = map(int,input().split())\nroad = [list(map(int,input().split())) for _ in range(m)]\ncnt = [0] * n\nfor i in road:\n    cnt[i[0]-1] += 1\n    cnt[i[1]-1] += 1\nfor j in range(n):\n    print(cnt[j])", "passed": true, "time": 0.27, "memory": 14120.0, "status": "done"}, {"code": "n, m = map(int,input().split())\n\nl = []\nfor i in range(m):\n    x,y = map(int,input().split())\n    l.append(x)\n    l.append(y)\n\nfor i in range(n):\n    print(l.count(i+1))", "passed": true, "time": 0.16, "memory": 14260.0, "status": "done"}, {"code": "n, m = map(int, input().split())\na = [0] * m\nb = [0] * m\nfor i in range(m):\n    a[i], b[i] = map(int, input().split())\n\nans = [0] * n\n\nfor i in range(m):\n    ans[a[i]-1] += 1\n    ans [b[i]-1] += 1\n\nfor i in ans:\n    print(i)", "passed": true, "time": 0.14, "memory": 14280.0, "status": "done"}, {"code": "# ABC061B\nN,M = map(int, input().split())\nAB = [[] for _ in range(N)]\nfor _ in range(M):\n    a,b = map(int, input().split())\n    AB[a-1].append(b-1)\n    AB[b-1].append(a-1)\nfor i in range(N):\n    print(len(AB[i]))", "passed": true, "time": 0.16, "memory": 14300.0, "status": "done"}, {"code": "N, M = list(map(int, input().split()))\nab = [list(map(int, input().split())) for _ in range(M)]\n\nd = {i+1: 0 for i in range(N)}\nfor i in range(M):\n    a = ab[i][0]\n    b = ab[i][1]\n    d[a] += 1\n    d[b] += 1\n\nfor i in range(N):\n    print((d[i+1]))\n", "passed": true, "time": 0.16, "memory": 14108.0, "status": "done"}, {"code": "n,m=map(int,input().split())\nc={i:0 for i in range(1,n+1)}\nfor _ in range(m):\n  a,b=map(int,input().split())\n  c[a]+=1;c[b]+=1\nprint(*c.values(),sep='\\n')", "passed": true, "time": 0.18, "memory": 14320.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nar = [0] * n\nfor i in range(m):\n  a, b = map(int, input().split())\n  ar[a-1] += 1\n  ar[b-1] += 1\nfor i in range(n):\n  print(ar[i])", "passed": true, "time": 0.18, "memory": 14216.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nedges = [tuple(map(int, input().split())) for _ in range(m)]\n\nc = [[] for _ in range(n + 1)]\n\nfor a, b in edges:\n    c[a].append(b)\n    c[b].append(a)\n\nfor i in range(1, n + 1):\n    print(len(c[i]))", "passed": true, "time": 0.18, "memory": 14252.0, "status": "done"}, {"code": "n,m = map(int,input().split())\ng = [[] for i in range(n)]\nfor i in range(m):\n  a,b = map(int,input().split())\n  g[a-1].append(b)\n  g[b-1].append(a)\nfor i in range(n):\n  print(len((g[i])))", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "n, m = list(map(int, input().split()))\ncnt = [0] * n\nfor i in range(m):\n    a, b = list(map(int, input().split()))\n    cnt[a-1] += 1\n    cnt[b-1] += 1\nfor i in range(n):\n    print((cnt[i]))\n", "passed": true, "time": 0.14, "memory": 14096.0, "status": "done"}, {"code": "n,m = map(int,input().split())\nN = list(range(1,n+1))\nD = dict.fromkeys(N,0)\n\nfor _ in range(m):\n  R = list(map(int,input().split()))\n  for r in R:\n    D[r] += 1\n\nfor d in D.values():\n  print(d)", "passed": true, "time": 0.29, "memory": 14324.0, "status": "done"}, {"code": "N, M = map(int,input().split())\nlist = []\n\nfor i in range(M):\n    a, b = map(int,input().split())\n    list.append(a)\n    list.append(b)\n\nfor j in range(1,N+1):\n    print(list.count(j))", "passed": true, "time": 0.29, "memory": 14144.0, "status": "done"}, {"code": "n, m = map(int, input().split())\n\ngraph = [[] for i in range(n+1)]\n\nfor i in range(m):\n  a, b = map(int, input().split())\n  graph[a].append(b)\n  graph[b].append(a)\n\nfor i in range(n):\n  print(len(graph[i+1]))", "passed": true, "time": 0.14, "memory": 14228.0, "status": "done"}, {"code": "n, m = map(int, input().split())\ns = []\nN = [0 for i in range(n)]\nfor i in range(m):\n    a,b = map(int, input().split())\n    s.append([a,b])\n    N[a-1] += 1\n    N[b-1] += 1\nfor j in range(n):\n    print(N[j])", "passed": true, "time": 0.13, "memory": 14080.0, "status": "done"}, {"code": "nm = list(map(int, input().split()))\nn, m = nm[0], nm[1]\nab_list = [list(map(int, input().split())) for _ in range(m)]\nresults = dict([(i, 0) for i in range(1, n + 1)])\nfor ab in ab_list:\n    results[ab[0]] += 1\n    results[ab[1]] += 1\n\nfor i in range(1, n + 1):\n    print((results[i]))\n", "passed": true, "time": 0.14, "memory": 14336.0, "status": "done"}, {"code": "N, M = tuple(map(int, input().split()))\n\ncount_road = [[0 for _ in range(N+1)] for _ in range(N+1)]\n\nfor _ in range(M):\n    a, b = tuple(map(int, input().split()))\n    count_road[a][b] += 1\n    count_road[b][a] += 1\n    \nfor i in range(1, N+1):\n    print(sum(count_road[i]))", "passed": true, "time": 0.15, "memory": 14280.0, "status": "done"}, {"code": "n, m = map(int, input().split())\ncity = [0] * n\nfor i in range(m):\n    a, b = map(int, input().split())\n    city[a - 1] += 1\n    city[b - 1] += 1\n\nfor i in city:\n    print(i)", "passed": true, "time": 0.15, "memory": 14328.0, "status": "done"}, {"code": "N,M=map(int,input().split())\ncnt=[0 for i in range(N)]\n\n\nfor i in range(M):\n    a,b=map(int,input().split())\n    cnt[a-1]+=1\n    cnt[b-1]+=1\n\nfor i in range(N):\n    print(cnt[i])", "passed": true, "time": 0.15, "memory": 14260.0, "status": "done"}, {"code": "from collections import Counter\n\nn,m=map(int,input().split())\n\nl=[]\nfor i in range(m):\n  lis=list(map(int,input().split()))\n  l+=lis\n  \nl=Counter(l)\n\nfor i in range(1,n+1):\n  print(l[i])", "passed": true, "time": 0.14, "memory": 14296.0, "status": "done"}, {"code": "N, M = map(int,input().split())\nab_list = []\n\nfor i in range(M):\n    a, b = map(int,input().split())\n    ab_list.append(a)\n    ab_list.append(b)\n    \nfor i in range(1, N + 1):\n    print(ab_list.count(i))", "passed": true, "time": 0.14, "memory": 14144.0, "status": "done"}, {"code": "N, M = map(int, input().split())\nab = [list(map(int, input().split())) for _ in range(M)]\nans = [0 for _ in range(N)]\nn = 1\nwhile True:\n    for i in range(M):\n        for j in range(2):\n            if n == ab[i][j]:\n                ans[n-1] += 1\n    if n == N:\n        break\n    n += 1\nfor i in range(N):\n    print(ans[i])", "passed": true, "time": 0.14, "memory": 14272.0, "status": "done"}, {"code": "from collections import defaultdict\nn,m = map(int, input().split())\nans = 0\nroute = [[0]*(n+1) for i in range(n+1)]\n\nfor i in range(m):\n  f,t = map(int, input().split())\n  route[f][t] += 1\n  route[t][f] += 1\n\nfor i in range(1, n+1):\n  print(sum(route[i]))", "passed": true, "time": 0.14, "memory": 14192.0, "status": "done"}, {"code": "import sys\nreadline = sys.stdin.readline\n\nN,M = map(int,readline().split())\nans = [0] * N\n\nfor i in range(M):\n  ab = list(map(int,readline().split()))\n  for a in ab:\n    ans[a - 1] += 1\n    \nfor a in ans:\n  print(a)", "passed": true, "time": 0.14, "memory": 14216.0, "status": "done"}, {"code": "N,M = map(int,input().split())\nl = [0]*N\nfor i in range(M):\n  a,b= map(int,input().split())\n  l[a-1]+=1\n  l[b-1]+=1\nfor i in range(N):\n  print(l[i])", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}, {"code": "n,m = map(int,input().split())\ns = [[] for i in range(n)]\nfor i in range(m):\n    a,b = map(int,input().split())\n    s[a-1].append(b)\n    s[b-1].append(a)\nfor i in s:\n    print(len(i))", "passed": true, "time": 0.14, "memory": 14252.0, "status": "done"}, {"code": "n,m=map(int,input().split())\nc=[0]*n\nfor _ in range(m):\n    a,b=[int(j) for j in input().split()]\n    c[a-1]+=1\n    c[b-1]+=1\nfor i in c:\n    print(i)", "passed": true, "time": 0.14, "memory": 14304.0, "status": "done"}, {"code": "n, m = map(int, input().split())\nroad = [list(map(int, input().split())) for _ in range(m)]\n\nroad = sum(road, [])\nfor i in range(1, n+1):\n  print(road.count(i))", "passed": true, "time": 0.14, "memory": 14104.0, "status": "done"}, {"code": "N, M = map(int, input().split())\nL = []\nfor i in range(M):\n  a, b = map(int, input().split())\n  L.append(a)\n  L.append(b)\n\nfor n in range(1, N+1):\n  print(L.count(n))", "passed": true, "time": 0.21, "memory": 14156.0, "status": "done"}, {"code": "N,M=list(map(int,input().split()))\nans=[0 for i in range(N)]\nfor _ in range(M):\n    a,b=list(map(int,input().split()))\n    ans[a-1]+=1\n    ans[b-1]+=1\n\nfor x in ans:\n    print(x)\n", "passed": true, "time": 0.14, "memory": 14212.0, "status": "done"}, {"code": "n,m = map(int,input().split())\nx =[0]*n\nfor i in range(m):\n    a,b = map(int,input().split())\n    x[a-1]+=1\n    x[b-1]+=1\nfor i in range(n):\n    print(x[i])", "passed": true, "time": 0.14, "memory": 14268.0, "status": "done"}]