mol=[]
for i in range(10):
    mol.append(int(input()))

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

mol.sort(key=None,reverse=True)
for i in range(3):
    print(mol[i])