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