#!/usr/bin/env python3
#coding: utf-8

# Volume0 - 0001 (http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001)

li = []
for x in range(10):
    s = input()
    s = int(s)
    li.append(s)

li.sort()
li.reverse()

for y in range(3):
    print(li[y]) li = [] li [] for x in range(10):
    s = input()
    s = int(s)
    li.append(s) x range(10) range 10 s = input() s input() input s = int(s) s int(s) int s li.append(s) li.append li append s li.sort() li.sort li sort li.reverse() li.reverse li reverse for y in range(3):
    print(li[y]) y range(3) range 3 print(li[y]) print li[y] li y s = int(s) int(s) s s = input() input() s li = [] [] li
#!/usr/bin/env python3
#coding: utf-8

# Volume0 - 0001 (http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0001)

li = []
for x in range(10):
    s = input()
    s = int(s)
    li.append(s)

li.sort()
li.reverse()

for y in range(3):
    print(li[y])