H = []
while True:
	try:
		H.append(input())
	except EOFError:
		break
H.sort()
print(H[-1])
print(H[-2])
print(H[-3]) H = [] H [] while True:
	try:
		H.append(input())
	except EOFError:
		break True try:
		H.append(input())
	except EOFError:
		break except EOFError:
		break break H.append(input()) H.append H append input() input H.sort() H.sort H sort print(H[-1]) print H[-1] H -1 print(H[-2]) print H[-2] H -2 print(H[-3]) print H[-3] H -3 H = [] [] H
H = []
while True:
	try:
		H.append(input())
	except EOFError:
		break
H.sort()
print(H[-1])
print(H[-2])
print(H[-3])