p1 = 0
p2 = 0
p3 = 0
for i in range(10):
    d = int(raw_input())
    if (d > p1):
        p3 = p2
        p2 = p1
        p1 = d
    elif (d > p2):
        p3 = p2
        p2 = d
    elif (d > p3):
        p3 = d

print p1
print p2
print p3 p1 = 0 p1 0 p2 = 0 p2 0 p3 = 0 p3 0 for i in range(10):
    d = int(raw_input())
    if (d > p1):
        p3 = p2
        p2 = p1
        p1 = d
    elif (d > p2):
        p3 = p2
        p2 = d
    elif (d > p3):
        p3 = d i range(10) range 10 d = int(raw_input()) d int(raw_input()) int raw_input() raw_input if (d > p1):
        p3 = p2
        p2 = p1
        p1 = d
    elif (d > p2):
        p3 = p2
        p2 = d
    elif (d > p3):
        p3 = d d > p1 d p1 p3 = p2 p3 p2 p2 = p1 p2 p1 p1 = d p1 d elif (d > p2):
        p3 = p2
        p2 = d
     d > p2 d p2 p3 = p2 p3 p2 p2 = d p2 d elif (d > p3):
        p3 = d d > p3 d p3 p3 = d p3 d print print print p2 = d d p2 d = int(raw_input()) int(raw_input()) d p2 = 0 0 p2 p3 = d d p3 p3 = 0 0 p3 p3 = p2 p2 p3 p1 = 0 0 p1 p2 = p1 p1 p2 p3 = p2 p2 p3 p1 = d d p1
p1 = 0
p2 = 0
p3 = 0
for i in range(10):
    d = int(raw_input())
    if (d > p1):
        p3 = p2
        p2 = p1
        p1 = d
    elif (d > p2):
        p3 = p2
        p2 = d
    elif (d > p3):
        p3 = d

print p1
print p2
print p3