a = [(int)(input()) for i in range(10)]
for i in range(3):
    print(max(a))
    a.remove(max(a)) (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 a = [(int)(input()) for i in range(10)] a [(int)(input()) for i in range(10)] for i in range(3):
    print(max(a))
    a.remove(max(a)) i range(3) range 3 print(max(a)) print max(a) max a a.remove(max(a)) a.remove a remove max(a) max a a = [(int)(input()) for i in range(10)] [(int)(input()) for i in range(10)] a
a = [(int)(input()) for i in range(10)]
for i in range(3):
    print(max(a))
    a.remove(max(a))