lis = [ ]
for i in range ( 10 ):
  lis.append ( int ( input ( ) ) )
lis.sort ( )
for i in range ( 3 ):
  print ( lis.pop ( ) ) lis = [ ] lis [ ] for i in range ( 10 ):
  lis.append ( int ( input ( ) ) ) i range ( 10 ) range 10 lis.append ( int ( input ( ) ) ) lis.append lis append int ( input ( ) ) int input ( ) input lis.sort ( ) lis.sort lis sort for i in range ( 3 ):
  print ( lis.pop ( ) ) i range ( 3 ) range 3 print ( lis.pop ( ) ) print lis.pop ( ) lis.pop lis pop lis = [ ] [ ] lis
lis = [ ]
for i in range ( 10 ):
  lis.append ( int ( input ( ) ) )
lis.sort ( )
for i in range ( 3 ):
  print ( lis.pop ( ) )