res = []
while True:
    try:
        n = input()
        res.append(n)
    except EOFError:
    	break
res.sort()
res = res[len(res)-3:]
for x in reversed(res):
	print x res = [] res [] while True:
    try:
        n = input()
        res.append(n)
    except EOFError:
    	break True try:
        n = input()
        res.append(n)
    except EOFError:
    	break except EOFError:
    	break break n = input() n input() input res.append(n) res.append res append n res.sort() res.sort res sort res = res[len(res)-3:] res res[len(res)-3:] res len(res)-3: len(res)-3 len(res) len res 3 for x in reversed(res):
	print x x reversed(res) reversed res print n = input() input() n res = res[len(res)-3:] res[len(res)-3:] res res = [] [] res
res = []
while True:
    try:
        n = input()
        res.append(n)
    except EOFError:
    	break
res.sort()
res = res[len(res)-3:]
for x in reversed(res):
	print x