Buggy python submission (verdict: Runtime Error):
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(m)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Fixed submission:
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(n)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Buggy python submission (verdict: Runtime Error):
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(m)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Fixed submission:
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(n)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Buggy python submission (verdict: Runtime Error):
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(5)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])

Fixed submission:
import math
import sys

#n, a, b= map(int, input().split())
n, m  = map(int, input().split())
#s = list(str(input()))
#n = int(input())
#a = list(map(int, input().split()))

a = [""]*m
b = [""]*m
for i in range(m):
  #a[i] = int(input())
  a[i], b[i] = map(int, input().split())

num = [int(i+1) for i in range(n)]
count = [0]*n

for i in range(m):
  for ii in range(n):
    if(a[i] == num[ii]):
      count[ii] = count[ii] + 1
    if(b[i] == num[ii]):
      count[ii] = count[ii] + 1

for i in range(n):
  print(count[i])