#coding:utf-8

l = []
for i in xrange(10):
    a = input()
    l.append(a)

for n in xrange(3):
    print(max(l))
    l.remove(max(l)) l = [] l [] for i in xrange(10):
    a = input()
    l.append(a) i xrange(10) xrange 10 a = input() a input() input l.append(a) l.append l append a for n in xrange(3):
    print(max(l))
    l.remove(max(l)) n xrange(3) xrange 3 print(max(l)) print max(l) max l l.remove(max(l)) l.remove l remove max(l) max l l = [] [] l a = input() input() a
#coding:utf-8

l = []
for i in xrange(10):
    a = input()
    l.append(a)

for n in xrange(3):
    print(max(l))
    l.remove(max(l))