High = []
for i in range(10):
    High.append(int(input()))
for i in range(3):
    print(max(High))
    High.remove(max(High)) High = [] High [] for i in range(10):
    High.append(int(input())) i range(10) range 10 High.append(int(input())) High.append High append int(input()) int input() input for i in range(3):
    print(max(High))
    High.remove(max(High)) i range(3) range 3 print(max(High)) print max(High) max High High.remove(max(High)) High.remove High remove max(High) max High High = [] [] High
High = []
for i in range(10):
    High.append(int(input()))
for i in range(3):
    print(max(High))
    High.remove(max(High))