one  = 0
two = 0
three  = 0
while 1:
	try :
		i = int(raw_input())
		if one<i:
			three=two
			two=one
			one=i
		elif two<i:
			three=two
			two=i
		elif three<i:
			three=i
    	except:
	    	print"%d" % (one)
	    	print"%d" % (two)
	    	print"%d" % (three)
	    	break one  = 0 one 0 two = 0 two 0 three  = 0 three 0 while 1:
	try :
		i = int(raw_input())
		if one<i:
			three=two
			two=one
			one=i
		elif two<i:
			three=two
			two=i
		elif three<i:
			three=i
    	except:
	    	print"%d" % (one)
	    	print"%d" % (two)
	    	print"%d" % (three)
	    	break 1 try :
		i = int(raw_input())
		if one<i:
			three=two
			two=one
			one=i
		elif two<i:
			three=two
			two=i
		elif three<i:
			three=i
    	except:
	    	print"%d" % (one)
	    	print"%d" % (two)
	    	print"%d" % (three)
	    	break except:
	    	print"%d" % (one)
	    	print"%d" % (two)
	    	print"%d" % (three)
	    	break print "%d" % (one) "%d" one print "%d" % (two) "%d" two print "%d" % (three) "%d" three break i = int(raw_input()) i int(raw_input()) int raw_input() raw_input if one<i:
			three=two
			two=one
			one=i
		elif two<i:
			three=two
			two=i
		elif three<i:
			three=i
    	 one<i one i three=two three two two=one two one one=i one i elif two<i:
			three=two
			two=i
		 two<i two i three=two three two two=i two i elif three<i:
			three=i
    	 three<i three i three=i three i three  = 0 0 three one=i i one three=two two three i = int(raw_input()) int(raw_input()) i two=i i two two=one one two one  = 0 0 one two = 0 0 two three=i i three three=two two three
one  = 0
two = 0
three  = 0
while 1:
	try :
		i = int(raw_input())
		if one<i:
			three=two
			two=one
			one=i
		elif two<i:
			three=two
			two=i
		elif three<i:
			three=i
    	except:
	    	print"%d" % (one)
	    	print"%d" % (two)
	    	print"%d" % (three)
	    	break