arr = []
for i in range(10):
	arr=arr+[int(raw_input())]
arr.sort()
arr.reverse()
for i in range(3):
	print(arr[i]) arr = [] arr [] for i in range(10):
	arr=arr+[int(raw_input())] i range(10) range 10 arr=arr+[int(raw_input())] arr arr+[int(raw_input())] arr [int(raw_input())] int(raw_input()) int raw_input() raw_input arr.sort() arr.sort arr sort arr.reverse() arr.reverse arr reverse for i in range(3):
	print(arr[i]) i range(3) range 3 print(arr[i]) print arr[i] arr i arr=arr+[int(raw_input())] arr+[int(raw_input())] arr arr = [] [] arr
arr = []
for i in range(10):
	arr=arr+[int(raw_input())]
arr.sort()
arr.reverse()
for i in range(3):
	print(arr[i])