order=[]
for number in range(10):
    hight=int(input())
    order.append(hight)
for j in range(9):
    for i in range(9):
        if order[i] < order[i+1]:
            a = order[i]
            b = order[i+1]
            order[i] = b
            order[i+1] = a
for i in range(3):
    print(order[i]) order=[] order [] for number in range(10):
    hight=int(input())
    order.append(hight) number range(10) range 10 hight=int(input()) hight int(input()) int input() input order.append(hight) order.append order append hight for j in range(9):
    for i in range(9):
        if order[i] < order[i+1]:
            a = order[i]
            b = order[i+1]
            order[i] = b
            order[i+1] = a j range(9) range 9 for i in range(9):
        if order[i] < order[i+1]:
            a = order[i]
            b = order[i+1]
            order[i] = b
            order[i+1] = a i range(9) range 9 if order[i] < order[i+1]:
            a = order[i]
            b = order[i+1]
            order[i] = b
            order[i+1] = a order[i] < order[i+1] order[i] order i order[i+1] order i+1 i 1 a = order[i] a order[i] order i b = order[i+1] b order[i+1] order i+1 i 1 order[i] = b order[i] order i b order[i+1] = a order[i+1] order i+1 i 1 a for i in range(3):
    print(order[i]) i range(3) range 3 print(order[i]) print order[i] order i hight=int(input()) int(input()) hight a = order[i] order[i] a order=[] [] order b = order[i+1] order[i+1] b
order=[]
for number in range(10):
    hight=int(input())
    order.append(hight)
for j in range(9):
    for i in range(9):
        if order[i] < order[i+1]:
            a = order[i]
            b = order[i+1]
            order[i] = b
            order[i+1] = a
for i in range(3):
    print(order[i])