int input int input None for in range for in range input split for in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
N = int(input())
K = int(input())
Q = [None for x in range(K)]
for i in range(N):
n, t, R = input().split()
for W in range(K):
if Q[W] == None:
print(n, W)
Q[W] = R
break