firstMountainHeight  = 0

secondMountainHeight = 0

thirdMountainHeight  = 0

while 1:

	try :

		i = int(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
one  = 0

two = 0

three  = 0

while 1:

	try :

		i = int(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
firstMountainHeight = 0
secondMountainHeight = 0
thirdMountainHeight = 0
while 1:
    try:
        i = int(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

one = 0
two = 0
three = 0
while 1:
    try:
        i = int(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

-firstMountainHeight = 0 -secondMountainHeight = 0 -thirdMountainHeight = 0 +one = 0 +two = 0 +three = 0 -        if firstMountainHeight < i: -            thirdMountainHeight = secondMountainHeight -            secondMountainHeight = firstMountainHeight -            firstMountainHeight = i -        elif secondMountainHeight < i: -            thirdMountainHeight = secondMountainHeight -            secondMountainHeight = i -        elif thirdMountainHeight < i: -            thirdMountainHeight = i +        if one < i: +            three = two +            two = one +            one = i +        elif two < i: +            three = two +            two = i +        elif three < i: +            three = i -        print("%d" % (firstMountainHeight)) -        print("%d" % (secondMountainHeight)) -        print("%d" % (thirdMountainHeight)) +        print("%d" % (one)) +        print("%d" % (two)) +        print("%d" % (three))