int input for in range t2 t3 t4 input split summa int int t2 int t3 in

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
n = int(input())
a = []
for i in range(n):
x,y,t,t2,t3,t4 = input().split()
summa = int(t)+int(t2)+int(t3)+int(t4)
a.append([summa,y,x])
a = sorted(a,key = lambda x: x[0],reverse = True)
i = -1
b = []
while 1:
i += 1
t = a[i][0]
if t not in b: b.append(t)
if len(b) > 3: break
print(a[i][1],a[i][2])