s = list()

for i in range(10):
    s.append(input())

s.sort(reverse = True)

for i in range(3):
    print s[i] s = list() s list() list for i in range(10):
    s.append(input()) i range(10) range 10 s.append(input()) s.append s append input() input s.sort(reverse = True) s.sort s sort reverse = True reverse True for i in range(3):
    print s[i] i range(3) range 3 print s[i] s i s = list() list() s
s = list()

for i in range(10):
    s.append(input())

s.sort(reverse = True)

for i in range(3):
    print s[i]