m = []
while True:
	try:
		m.append(int(raw_input()))
	except EOFError:
		break
m.sort()
m.reverse()
for h in m[0:3]:
	print h m = [] m [] while True:
	try:
		m.append(int(raw_input()))
	except EOFError:
		break True try:
		m.append(int(raw_input()))
	except EOFError:
		break except EOFError:
		break break m.append(int(raw_input())) m.append m append int(raw_input()) int raw_input() raw_input m.sort() m.sort m sort m.reverse() m.reverse m reverse for h in m[0:3]:
	print h h m[0:3] m 0:3 0 3 print m = [] [] m
m = []
while True:
	try:
		m.append(int(raw_input()))
	except EOFError:
		break
m.sort()
m.reverse()
for h in m[0:3]:
	print h