m = []
for _ in range(10):
    r = int(input())
    m.append(r)

m.sort()

print (m[9]);
print (m[8]);
print (m[7]); m = [] m [] for _ in range(10):
    r = int(input())
    m.append(r) _ range(10) range 10 r = int(input()) r int(input()) int input() input m.append(r) m.append m append r m.sort() m.sort m sort print (m[9]) print m[9] m 9 print (m[8]) print m[8] m 8 print (m[7]) print m[7] m 7 r = int(input()) int(input()) r m = [] [] m
m = []
for _ in range(10):
    r = int(input())
    m.append(r)

m.sort()

print (m[9]);
print (m[8]);
print (m[7]);