a=[]
for i in range(10):
    x=input()
    a.append(x)
a.sort()
for i in range(9,6,-1):
    print a[i] a=[] a [] for i in range(10):
    x=input()
    a.append(x) i range(10) range 10 x=input() x input() input a.append(x) a.append a append x a.sort() a.sort a sort for i in range(9,6,-1):
    print a[i] i range(9,6,-1) range 9 6 -1 print a[i] a i a=[] [] a x=input() input() x
a=[]
for i in range(10):
    x=input()
    a.append(x)
a.sort()
for i in range(9,6,-1):
    print a[i]