mtheight = []
 
for i in xrange(0,10):
    mtheight.append(input())
 
mtheight.sort()
for i in xrange(0,3):
    print mtheight[9 - i] mtheight = [] mtheight [] for i in xrange(0,10):
    mtheight.append(input())
  i xrange(0,10) xrange 0 10 mtheight.append(input()) mtheight.append mtheight append input() input mtheight.sort() mtheight.sort mtheight sort for i in xrange(0,3):
    print mtheight[9 - i] i xrange(0,3) xrange 0 3 print mtheight[9 - i] mtheight 9 - i 9 i mtheight = [] [] mtheight
mtheight = []
 
for i in xrange(0,10):
    mtheight.append(input())
 
mtheight.sort()
for i in xrange(0,3):
    print mtheight[9 - i]