list = []
for i in range(10):
    n = int(input())
    list.append(n)
list.sort()
print (list[-1])
print (list[-2])
print (list[-3]) list = [] list [] for i in range(10):
    n = int(input())
    list.append(n) i range(10) range 10 n = int(input()) n int(input()) int input() input list.append(n) list.append list append n list.sort() list.sort list sort print (list[-1]) print list[-1] list -1 print (list[-2]) print list[-2] list -2 print (list[-3]) print list[-3] list -3 n = int(input()) int(input()) n list = [] [] list
list = []
for i in range(10):
    n = int(input())
    list.append(n)
list.sort()
print (list[-1])
print (list[-2])
print (list[-3])