a = []
for i in range(10):
    a.append(int(input()))
a.sort()
for j in range(3):
    print(a[-(j+1)]) a = [] a [] for i in range(10):
    a.append(int(input())) i range(10) range 10 a.append(int(input())) a.append a append int(input()) int input() input a.sort() a.sort a sort for j in range(3):
    print(a[-(j+1)]) j range(3) range 3 print(a[-(j+1)]) print a[-(j+1)] a -(j+1) j+1 j 1 a = [] [] a
a = []
for i in range(10):
    a.append(int(input()))
a.sort()
for j in range(3):
    print(a[-(j+1)])