Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
x = [0]*n
y = [0]*n
mx = [0]*m
my = [0]*m
for i in range(n):
    x[i],y[i] = map(int,input().split())
for j in range(m):
    mx[j],my[j] = map(int,input().split())
#print(x)
#print(y)
#print(mx)
#print(my)
ans = [0]*n
#print(ans)
for k in range(n):
    dis = 1000000000
    cnt = 1
    for l in range(n):
        if abs(x[k]-mx[l])+abs(y[k]-my[l]) < dis:
            dis = abs(x[k]-mx[l])+abs(y[k]-my[l])
            cnt = l+1
    ans[k] = cnt
for h in ans:
    print(h)

Fixed submission:
n,m = map(int,input().split())
student = []
Coodinate = []
for i in range(n):
    student.append(list(map(int,input().split())))
for j in range(m):
    Coodinate.append(list(map(int,input().split())))
ans = []
#print(student)
#print(Coodinate)
for k in student:
    manhattan = 100000000000
    number = 0
    for u in range(m):
        manhattann = abs(k[0]-Coodinate[u][0])+abs(k[1]-Coodinate[u][1])
        if manhattann < manhattan:
            manhattan = manhattann
            number = u+1
    ans.append(number)
for y in ans:
    print(y)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
x = [0]*n
y = [0]*n
mx = [0]*m
my = [0]*m
for i in range(n):
    x[i],y[i] = map(int,input().split())
for j in range(m):
    mx[j],my[j] = map(int,input().split())
ans = [0]*n
for k in range(n):
    dis = 1000000000
    cnt = 1
    for l in range(n):
        if abs(x[k]-mx[l])+abs(y[k]-my[l]) < dis:
            dis = abs(x[k]-mx[l])+abs(y[k]-my[l])
            cnt = l+1
    ans[k] = cnt
for h in ans:
    print(h)

Fixed submission:
n,m = map(int,input().split())
student = []
Coodinate = []
for i in range(n):
    student.append(list(map(int,input().split())))
for j in range(m):
    Coodinate.append(list(map(int,input().split())))
ans = []
#print(student)
#print(Coodinate)
for k in student:
    manhattan = 100000000000
    number = 0
    for u in range(m):
        manhattann = abs(k[0]-Coodinate[u][0])+abs(k[1]-Coodinate[u][1])
        if manhattann < manhattan:
            manhattan = manhattann
            number = u+1
    ans.append(number)
for y in ans:
    print(y)

Buggy python submission (verdict: Runtime Error):
n,m = map(int,input().split())
x = [0]*n
y = [0]*n
mx = [0]*m
my = [0]*m
for i in range(n):
    x[i],y[i] = map(int,input().split())
for j in range(m):
    mx[j],my[j] = map(int,input().split())
ans = [0]*n
for k in range(n):
    dis = 0
    cnt = 1
    for l in range(n):
        if abs(x[k]-xs[l])+abs(y[k]-ys[l]) > dis:
            dis = abs(x[k]-xs[l])+abs(y[k]-ys[l])
            cnt = l+1
    ans[k] = cnt
for h in ans:
    print(h)

Fixed submission:
n,m = map(int,input().split())
student = []
Coodinate = []
for i in range(n):
    student.append(list(map(int,input().split())))
for j in range(m):
    Coodinate.append(list(map(int,input().split())))
ans = []
#print(student)
#print(Coodinate)
for k in student:
    manhattan = 100000000000
    number = 0
    for u in range(m):
        manhattann = abs(k[0]-Coodinate[u][0])+abs(k[1]-Coodinate[u][1])
        if manhattann < manhattan:
            manhattan = manhattann
            number = u+1
    ans.append(number)
for y in ans:
    print(y)