Buggy python submission (verdict: Runtime Error):
# ABC 057: B – Checkpoints
studentPoints = []
checkPoints = []
n, m = map(int, input().split())
for _ in range(n):
    studentPoints.append([int(s) for s in input().split()])
for _ in range(m):
    checkPoints.append([int(s) for s in input().split()])

for i in range(n):
    distances = [abs(studentPoints[i][0] - checkPoints[k][0]) + abs(studentPoints[i][1] - checkPoints[k][1]) for k in range(m)]
    target = distances.index(min(distances))
    print(target + 1)
    m -= 1

Fixed submission:
# ABC 057: B – Checkpoints
n, m = [int(s) for s in input().split()]

a = []
b = []

for i in range(n):
    tmp = [int(s) for s in input().split()]
    a.append(tmp[0])
    b.append(tmp[1])

c = []
d = []

for j in range(m):
    tmp = [int(s) for s in input().split()]
    c.append(tmp[0])
    d.append(tmp[1])

for i in range(n):
    checkpoint = 0
    distance = abs(c[0] - a[i]) + abs(d[0] - b[i])
    
    for j in range(m):
        if distance > abs(c[j] - a[i]) + abs(d[j] - b[i]):
            distance = abs(c[j] - a[i]) + abs(d[j] - b[i])
            checkpoint = j
    
    print(checkpoint + 1)

Buggy python submission (verdict: Runtime Error):
# ABC 057: B – Checkpoints
studentPoints = []
checkPoints = []
n, m = map(int, input().split())
for _ in range(n):
    studentPoints.append([int(s) for s in input().split()])
for _ in range(m):
    checkPoints.append([int(s) for s in input().split()])

for i in range(n):
    distances = [abs(studentPoints[i][0] - checkPoints[k][0]) + abs(studentPoints[i][1] - checkPoints[k][1]) for k in range(m)]
    target = distances.index(min(distances))
    print(target + 1)
    m -= 1

Fixed submission:
# ABC 057: B – Checkpoints
n, m = [int(s) for s in input().split()]

a = []
b = []

for i in range(n):
    tmp = [int(s) for s in input().split()]
    a.append(tmp[0])
    b.append(tmp[1])

c = []
d = []

for j in range(m):
    tmp = [int(s) for s in input().split()]
    c.append(tmp[0])
    d.append(tmp[1])

for i in range(n):
    checkpoint = 0
    distance = abs(c[0] - a[i]) + abs(d[0] - b[i])
    
    for j in range(m):
        if distance > abs(c[j] - a[i]) + abs(d[j] - b[i]):
            distance = abs(c[j] - a[i]) + abs(d[j] - b[i])
            checkpoint = j
    
    print(checkpoint + 1)

Buggy python submission (verdict: Runtime Error):
# ABC 057: B – Checkpoints
n, m = [int(s) for s in input().split()]

a = []
b = []

for i in range(n):
    tmp = [int(s) for s in input().split()]
    a.append(tmp[0])
    b.append(tmp[1])

c = []
d = []

for j in range(m):
    tmp = [int(s) for s in input().split()]
    c.append(tmp[0])
    d.append(tmp[1])

for i in range(n):
    checkpoint = 0
    distance = abs(c[i] - a[0]) + abs(d[i] - b[0])
    
    for j in range(m):
        if distance > abs(c[j] - a[i]) + abs(d[j] - b[i]):
            distance = abs(c[j] - a[i]) + abs(d[j] - b[i])
            checkpoint = j
    
    print(checkpoint + 1)


Fixed submission:
# ABC 057: B – Checkpoints
n, m = [int(s) for s in input().split()]

a = []
b = []

for i in range(n):
    tmp = [int(s) for s in input().split()]
    a.append(tmp[0])
    b.append(tmp[1])

c = []
d = []

for j in range(m):
    tmp = [int(s) for s in input().split()]
    c.append(tmp[0])
    d.append(tmp[1])

for i in range(n):
    checkpoint = 0
    distance = abs(c[0] - a[i]) + abs(d[0] - b[i])
    
    for j in range(m):
        if distance > abs(c[j] - a[i]) + abs(d[j] - b[i]):
            distance = abs(c[j] - a[i]) + abs(d[j] - b[i])
            checkpoint = j
    
    print(checkpoint + 1)