a = []

for i in range(10):

  b = int(eval(input()))

  a.append(b)

a.sort()

print(a[9])

print(a[8])

print(a[7])
b=[]

for i in range(10):

 a=int(eval(input()))

 b.append(a)

b.sort()

for i in range(9,6,-1):

 print(b[i])
a = []
for i in range(10):
    b = int(eval(input()))
    a.append(b)
a.sort()
print(a[9])
print(a[8])
print(a[7])

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

-a = [] +b = [] -    b = int(eval(input())) -    a.append(b) -a.sort() -print(a[9]) -print(a[8]) -print(a[7]) +    a = int(eval(input())) +    b.append(a) +b.sort() +for i in range(9, 6, -1): +    print(b[i])