mountains = []
for n in range(10):
	mountains.append(int(input()))

mountains.sort()
mountains.reverse()

for n in [0,1,2]:
	print(mountains[n]) mountains = [] mountains [] for n in range(10):
	mountains.append(int(input())) n range(10) range 10 mountains.append(int(input())) mountains.append mountains append int(input()) int input() input mountains.sort() mountains.sort mountains sort mountains.reverse() mountains.reverse mountains reverse for n in [0,1,2]:
	print(mountains[n]) n [0,1,2] 0 1 2 print(mountains[n]) print mountains[n] mountains n mountains = [] [] mountains
mountains = []
for n in range(10):
	mountains.append(int(input()))

mountains.sort()
mountains.reverse()

for n in [0,1,2]:
	print(mountains[n])