a = []
for i in range(10):
    a.append(input())
a1_list = [int(i) for i in a]
a1_list.sort()
for i in range(3):
    print(a1_list[9-i]) a = [] a [] for i in range(10):
    a.append(input()) i range(10) range 10 a.append(input()) a.append a append input() input int(i) for i in a for i in a i a for i in a int(i) int i a1_list = [int(i) for i in a] a1_list [int(i) for i in a] a1_list.sort() a1_list.sort a1_list sort for i in range(3):
    print(a1_list[9-i]) i range(3) range 3 print(a1_list[9-i]) print a1_list[9-i] a1_list 9-i 9 i a1_list = [int(i) for i in a] [int(i) for i in a] a1_list a = [] [] a
a = []
for i in range(10):
    a.append(input())
a1_list = [int(i) for i in a]
a1_list.sort()
for i in range(3):
    print(a1_list[9-i])