list1=[]
for i in range(10):
    list1.append(int(input()))
list1=sorted(list1)
list1.reverse()
for i in range(3):
    print(list1[i]) list1=[] list1 [] for i in range(10):
    list1.append(int(input())) i range(10) range 10 list1.append(int(input())) list1.append list1 append int(input()) int input() input list1=sorted(list1) list1 sorted(list1) sorted list1 list1.reverse() list1.reverse list1 reverse for i in range(3):
    print(list1[i]) i range(3) range 3 print(list1[i]) print list1[i] list1 i list1=[] [] list1 list1=sorted(list1) sorted(list1) list1
list1=[]
for i in range(10):
    list1.append(int(input()))
list1=sorted(list1)
list1.reverse()
for i in range(3):
    print(list1[i])