mnts = []
for t in xrange(0, 10):
	mnts.append(int(raw_input()))
tops = sorted(mnts, reverse = True)
for i in xrange(0, 3):
	print tops[i] mnts = [] mnts [] for t in xrange(0, 10):
	mnts.append(int(raw_input())) t xrange(0, 10) xrange 0 10 mnts.append(int(raw_input())) mnts.append mnts append int(raw_input()) int raw_input() raw_input tops = sorted(mnts, reverse = True) tops sorted(mnts, reverse = True) sorted mnts reverse = True reverse True for i in xrange(0, 3):
	print tops[i] i xrange(0, 3) xrange 0 3 print tops[i] tops i mnts = [] [] mnts tops = sorted(mnts, reverse = True) sorted(mnts, reverse = True) tops
mnts = []
for t in xrange(0, 10):
	mnts.append(int(raw_input()))
tops = sorted(mnts, reverse = True)
for i in xrange(0, 3):
	print tops[i]