x = []

for i in xrange(10):
    x.append(input())

x.sort()
x = x[::-1]
for i in xrange(3):
    print x[i] x = [] x [] for i in xrange(10):
    x.append(input()) i xrange(10) xrange 10 x.append(input()) x.append x append input() input x.sort() x.sort x sort x = x[::-1] x x[::-1] x ::-1 -1 for i in xrange(3):
    print x[i] i xrange(3) xrange 3 print x[i] x i x = x[::-1] x[::-1] x x = [] [] x
x = []

for i in xrange(10):
    x.append(input())

x.sort()
x = x[::-1]
for i in xrange(3):
    print x[i]