a = []
for i in range(10):
    a.append(int(input()))
for i in sorted(a)[-1:-4:-1]:
    print(i) a = [] a [] for i in range(10):
    a.append(int(input())) i range(10) range 10 a.append(int(input())) a.append a append int(input()) int input() input for i in sorted(a)[-1:-4:-1]:
    print(i) i sorted(a)[-1:-4:-1] (a) sorted a -1:-4:-1 -1 -4 -1 print(i) print i a = [] [] a
a = []
for i in range(10):
    a.append(int(input()))
for i in sorted(a)[-1:-4:-1]:
    print(i)