L=[]

for i in range(0,10):
    x = raw_input()
    L.append(int(x))
L.sort()

for i in range(0,3):
    print L.pop() L=[] L [] for i in range(0,10):
    x = raw_input()
    L.append(int(x)) i range(0,10) range 0 10 x = raw_input() x raw_input() raw_input L.append(int(x)) L.append L append int(x) int x L.sort() L.sort L sort for i in range(0,3):
    print L.pop() i range(0,3) range 0 3 print L.pop() L.pop L pop x = raw_input() raw_input() x L=[] [] L
L=[]

for i in range(0,10):
    x = raw_input()
    L.append(int(x))
L.sort()

for i in range(0,3):
    print L.pop()