a=[]
for i in range(1,11):
    b=int(input())
    a.append(b)
a.sort(reverse=True)
for i in range(3):
    print(a[i]) a=[] a [] for i in range(1,11):
    b=int(input())
    a.append(b) i range(1,11) range 1 11 b=int(input()) b int(input()) int input() input a.append(b) a.append a append b a.sort(reverse=True) a.sort a sort reverse=True reverse True for i in range(3):
    print(a[i]) i range(3) range 3 print(a[i]) print a[i] a i b=int(input()) int(input()) b a=[] [] a
a=[]
for i in range(1,11):
    b=int(input())
    a.append(b)
a.sort(reverse=True)
for i in range(3):
    print(a[i])