a = [0, 0, 0, 0]
for t in range(10):
    a[3] = input()
    for i in range(2, -1, -1):
        if (a[i] < a[i+1]):
            a[i], a[i+1] = a[i+1], a[i]

for i in range(0, 3):
    print a[i] a = [0, 0, 0, 0] a [0, 0, 0, 0] 0 0 0 0 for t in range(10):
    a[3] = input()
    for i in range(2, -1, -1):
        if (a[i] < a[i+1]):
            a[i], a[i+1] = a[i+1], a[i] t range(10) range 10 a[3] = input() a[3] a 3 input() input for i in range(2, -1, -1):
        if (a[i] < a[i+1]):
            a[i], a[i+1] = a[i+1], a[i] i range(2, -1, -1) range 2 -1 -1 if (a[i] < a[i+1]):
            a[i], a[i+1] = a[i+1], a[i] a[i] < a[i+1] a[i] a i a[i+1] a i+1 i 1 a[i], a[i+1] = a[i+1], a[i] a[i] a i a[i+1] a i+1 i 1 a[i+1] a i+1 i 1 a[i] a i for i in range(0, 3):
    print a[i] i range(0, 3) range 0 3 print a[i] a i a = [0, 0, 0, 0] [0, 0, 0, 0] a
a = [0, 0, 0, 0]
for t in range(10):
    a[3] = input()
    for i in range(2, -1, -1):
        if (a[i] < a[i+1]):
            a[i], a[i+1] = a[i+1], a[i]

for i in range(0, 3):
    print a[i]