data = []
for i in range(1,11):
	h = int(input())
	data.append(h)

for i in sorted(data)[::-1][0:3]:
	print(i) data = [] data [] for i in range(1,11):
	h = int(input())
	data.append(h) i range(1,11) range 1 11 h = int(input()) h int(input()) int input() input data.append(h) data.append data append h for i in sorted(data)[::-1][0:3]:
	print(i) i sorted(data)[::-1][0:3] [::-1] (data) sorted data ::-1 -1 0:3 0 3 print(i) print i data = [] [] data h = int(input()) int(input()) h
data = []
for i in range(1,11):
	h = int(input())
	data.append(h)

for i in sorted(data)[::-1][0:3]:
	print(i)