a=[]
for i in range(10):
    a.append(int(input()))
a=sorted(a)[::-1]
for i in range(3):
    print(a[i]) 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=sorted(a)[::-1] a sorted(a)[::-1] (a) sorted a ::-1 -1 for i in range(3):
    print(a[i]) i range(3) range 3 print(a[i]) print a[i] a i a=[] [] a a=sorted(a)[::-1] sorted(a)[::-1] a
a=[]
for i in range(10):
    a.append(int(input()))
a=sorted(a)[::-1]
for i in range(3):
    print(a[i])