ans=[]

for i in range (0,10):

    ans.append(int(eval(input())))

ans.sort(reverse=True)

for i in range (0,3):

    print((ans[i]))
mountain=[]

for s in range(0,10):

    mountain.append(int(eval(input())))

mountain.sort(reverse=True)

for s in range(0,3):

 print((mountain[s]))
ans = []
for i in range(0, 10):
    ans.append(int(eval(input())))
ans.sort(reverse=True)
for i in range(0, 3):
    print((ans[i]))

mountain = []
for s in range(0, 10):
    mountain.append(int(eval(input())))
mountain.sort(reverse=True)
for s in range(0, 3):
    print((mountain[s]))

-ans = [] -for i in range(0, 10): -    ans.append(int(eval(input()))) -ans.sort(reverse=True) -for i in range(0, 3): -    print((ans[i])) +mountain = [] +for s in range(0, 10): +    mountain.append(int(eval(input()))) +mountain.sort(reverse=True) +for s in range(0, 3): +    print((mountain[s]))