firstMountainHeight  = 0
secondMountainHeight = 0
thirdMountainHeight  = 0

while 1:

	try :

		i = int(raw_input())

		if firstMountainHeight    < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = firstMountainHeight
			firstMountainHeight  = i

		elif secondMountainHeight < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = i
			
		elif thirdMountainHeight  < i :
			thirdMountainHeight   = i
			
    	except:
	    	print"%d" % (firstMountainHeight)
	    	print"%d" % (secondMountainHeight)
	    	print"%d" % (thirdMountainHeight)

	    	break firstMountainHeight  = 0 firstMountainHeight 0 secondMountainHeight = 0 secondMountainHeight 0 thirdMountainHeight  = 0 thirdMountainHeight 0 while 1:

	try :

		i = int(raw_input())

		if firstMountainHeight    < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = firstMountainHeight
			firstMountainHeight  = i

		elif secondMountainHeight < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = i
			
		elif thirdMountainHeight  < i :
			thirdMountainHeight   = i
			
    	except:
	    	print"%d" % (firstMountainHeight)
	    	print"%d" % (secondMountainHeight)
	    	print"%d" % (thirdMountainHeight)

	    	break 1 try :

		i = int(raw_input())

		if firstMountainHeight    < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = firstMountainHeight
			firstMountainHeight  = i

		elif secondMountainHeight < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = i
			
		elif thirdMountainHeight  < i :
			thirdMountainHeight   = i
			
    	except:
	    	print"%d" % (firstMountainHeight)
	    	print"%d" % (secondMountainHeight)
	    	print"%d" % (thirdMountainHeight)

	    	break except:
	    	print"%d" % (firstMountainHeight)
	    	print"%d" % (secondMountainHeight)
	    	print"%d" % (thirdMountainHeight)

	    	break print "%d" % (firstMountainHeight) "%d" firstMountainHeight print "%d" % (secondMountainHeight) "%d" secondMountainHeight print "%d" % (thirdMountainHeight) "%d" thirdMountainHeight break i = int(raw_input()) i int(raw_input()) int raw_input() raw_input if firstMountainHeight    < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = firstMountainHeight
			firstMountainHeight  = i

		elif secondMountainHeight < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = i
			
		elif thirdMountainHeight  < i :
			thirdMountainHeight   = i
			
    	 firstMountainHeight    < i firstMountainHeight i thirdMountainHeight  = secondMountainHeight thirdMountainHeight secondMountainHeight secondMountainHeight = firstMountainHeight secondMountainHeight firstMountainHeight firstMountainHeight  = i firstMountainHeight i elif secondMountainHeight < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = i
			
		 secondMountainHeight < i secondMountainHeight i thirdMountainHeight  = secondMountainHeight thirdMountainHeight secondMountainHeight secondMountainHeight = i secondMountainHeight i elif thirdMountainHeight  < i :
			thirdMountainHeight   = i
			
    	 thirdMountainHeight  < i thirdMountainHeight i thirdMountainHeight   = i thirdMountainHeight i i = int(raw_input()) int(raw_input()) i thirdMountainHeight  = secondMountainHeight secondMountainHeight thirdMountainHeight firstMountainHeight  = i i firstMountainHeight thirdMountainHeight   = i i thirdMountainHeight thirdMountainHeight  = 0 0 thirdMountainHeight secondMountainHeight = 0 0 secondMountainHeight secondMountainHeight = firstMountainHeight firstMountainHeight secondMountainHeight firstMountainHeight  = 0 0 firstMountainHeight secondMountainHeight = i i secondMountainHeight thirdMountainHeight  = secondMountainHeight secondMountainHeight thirdMountainHeight
firstMountainHeight  = 0
secondMountainHeight = 0
thirdMountainHeight  = 0

while 1:

	try :

		i = int(raw_input())

		if firstMountainHeight    < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = firstMountainHeight
			firstMountainHeight  = i

		elif secondMountainHeight < i :
			thirdMountainHeight  = secondMountainHeight
			secondMountainHeight = i
			
		elif thirdMountainHeight  < i :
			thirdMountainHeight   = i
			
    	except:
	    	print"%d" % (firstMountainHeight)
	    	print"%d" % (secondMountainHeight)
	    	print"%d" % (thirdMountainHeight)

	    	break