moutain = [0 for i in range(10)]
for i in range(10):
    moutain[i] = int(raw_input())
moutain.sort(reverse=True)
for i in range(3):
    print moutain[i] 0 for i in range(10) for i in range(10) i range(10) range 10 for i in range(10) 0 moutain = [0 for i in range(10)] moutain [0 for i in range(10)] for i in range(10):
    moutain[i] = int(raw_input()) i range(10) range 10 moutain[i] = int(raw_input()) moutain[i] moutain i int(raw_input()) int raw_input() raw_input moutain.sort(reverse=True) moutain.sort moutain sort reverse=True reverse True for i in range(3):
    print moutain[i] i range(3) range 3 print moutain[i] moutain i moutain = [0 for i in range(10)] [0 for i in range(10)] moutain
moutain = [0 for i in range(10)]
for i in range(10):
    moutain[i] = int(raw_input())
moutain.sort(reverse=True)
for i in range(3):
    print moutain[i]
