l = []
for i in range(10):
    inp = input()
    l.append(int(inp))
l.sort()
l.reverse()
for i in range(3):
    print(l[i]) l = [] l [] for i in range(10):
    inp = input()
    l.append(int(inp)) i range(10) range 10 inp = input() inp input() input l.append(int(inp)) l.append l append int(inp) int inp l.sort() l.sort l sort l.reverse() l.reverse l reverse for i in range(3):
    print(l[i]) i range(3) range 3 print(l[i]) print l[i] l i l = [] [] l inp = input() input() inp
l = []
for i in range(10):
    inp = input()
    l.append(int(inp))
l.sort()
l.reverse()
for i in range(3):
    print(l[i])