a=[]

for x in range(10):

    a.append(eval(input()))



a.sort(reverse=True)

for x in range(3):

    print(a[x])
a=[eval(input()) for i in range(10)]

a.sort(reverse=True)

for i in range(3):

    print(a[i])
a = []
for x in range(10):
    a.append(eval(input()))
a.sort(reverse=True)
for x in range(3):
    print(a[x])

a = [eval(input()) for i in range(10)]
a.sort(reverse=True)
for i in range(3):
    print(a[i])

-a = [] -for x in range(10): -    a.append(eval(input())) +a = [eval(input()) for i in range(10)] -for x in range(3): -    print(a[x]) +for i in range(3): +    print(a[i])