# coding: utf-8
mountain = [int(input()) for i in range(10)]
for i in range(3):
    print(max(mountain))
    mountain.remove(max(mountain)) int(input()) for i in range(10) for i in range(10) i range(10) range 10 for i in range(10) int(input()) int input() input mountain = [int(input()) for i in range(10)] mountain [int(input()) for i in range(10)] for i in range(3):
    print(max(mountain))
    mountain.remove(max(mountain)) i range(3) range 3 print(max(mountain)) print max(mountain) max mountain mountain.remove(max(mountain)) mountain.remove mountain remove max(mountain) max mountain mountain = [int(input()) for i in range(10)] [int(input()) for i in range(10)] mountain
# coding: utf-8
mountain = [int(input()) for i in range(10)]
for i in range(3):
    print(max(mountain))
    mountain.remove(max(mountain))