# -*- coding: utf-8 -*-

a = [int(raw_input()) for _ in range(10)]
#print a
b = sorted(a, reverse=True)
#print b
for c in b[0:3]:
    print c int(raw_input()) for _ in range(10) for _ in range(10) _ range(10) range 10 for _ in range(10) int(raw_input()) int raw_input() raw_input a = [int(raw_input()) for _ in range(10)] a [int(raw_input()) for _ in range(10)] b = sorted(a, reverse=True) b sorted(a, reverse=True) sorted a reverse=True reverse True for c in b[0:3]:
    print c c b[0:3] b 0:3 0 3 print b = sorted(a, reverse=True) sorted(a, reverse=True) b a = [int(raw_input()) for _ in range(10)] [int(raw_input()) for _ in range(10)] a
# -*- coding: utf-8 -*-

a = [int(raw_input()) for _ in range(10)]
#print a
b = sorted(a, reverse=True)
#print b
for c in b[0:3]:
    print c