Buggy python submission (verdict: Runtime Error):
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  print(dic[i+1])

Fixed submission:
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)

Buggy python submission (verdict: Runtime Error):
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
	dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
	dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  print(dic[i+1])

Fixed submission:
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)

Buggy python submission (verdict: Runtime Error):
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
	  dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
	  dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  print(dic[i+1])

Fixed submission:
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)

Buggy python submission (verdict: Runtime Error):
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])
 
for i in range(m):
  if ab[i][0] in dic.keys():
	  dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
	  dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  print(dic[i+1])

Fixed submission:
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)

Buggy python submission (verdict: Runtime Error):
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(i) for i in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
	  dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
	  dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  print(dic[i+1])
    

Fixed submission:
[n,m] = [int(i) for i in input().split()]
ab = []
dic = {}
for i in range(m):
  ab.append([int(j) for j in input().split()])

for i in range(m):
  if ab[i][0] in dic.keys():
    dic[ab[i][0]] += 1
  else:
    dic[ab[i][0]] = 1
    
  if  ab[i][1] in dic.keys():
    dic[ab[i][1]] += 1
  else:
    dic[ab[i][1]] = 1
    
for i in range(n):
  if i+1 in dic.keys():
    print(dic[i+1])
  else:
    print(0)