M = [0 for i in xrange(10)]

for i in xrange(10):
    M[i] = int(raw_input())
    
M.sort()
M.reverse()

for i in xrange(3):
    print M[i] 0 for i in xrange(10) for i in xrange(10) i xrange(10) xrange 10 for i in xrange(10) 0 M = [0 for i in xrange(10)] M [0 for i in xrange(10)] for i in xrange(10):
    M[i] = int(raw_input())
     i xrange(10) xrange 10 M[i] = int(raw_input()) M[i] M i int(raw_input()) int raw_input() raw_input M.sort() M.sort M sort M.reverse() M.reverse M reverse for i in xrange(3):
    print M[i] i xrange(3) xrange 3 print M[i] M i M = [0 for i in xrange(10)] [0 for i in xrange(10)] M
M = [0 for i in xrange(10)]

for i in xrange(10):
    M[i] = int(raw_input())
    
M.sort()
M.reverse()

for i in xrange(3):
    print M[i]