s = 10*[0]

for i in range(10):
    s[i] = input()

s.sort(reverse = True)

for i in range(3):
    print s[i] s = 10*[0] s 10*[0] 10 [0] 0 for i in range(10):
    s[i] = input() i range(10) range 10 s[i] = input() s[i] s i 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 = 10*[0] 10*[0] s
s = 10*[0]

for i in range(10):
    s[i] = input()

s.sort(reverse = True)

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