第6章-7 找出总分最高的学生
n = int(input())
ans = []
for i in range(0, n):
t = list(map(str, input().split()))
Student = dict()
Student['id'] = t[0]
Student['name'] = t[1]
Student['s1'] = int(t[2])
Student['s2'] = int(t[3])
Student['s3'] = int(t[4])
Student['tot'] = int(t[2]) + int(t[3]) + int(t[4])
ans.append(Student)
ans.sort(key=lambda x: x['tot'], reverse=True)
#print(ans[0])
print('{:s} {:s} {:d}'.format(ans[0]['name'], ans[0]['id'], ans[0]['tot']))