f, s, t = 3,2,1
for i in range(10):
    z = int(input())
    if z >= f:
        f,s,t = z, f, s;
    elif z>=s:
        s,t = z,s;
    elif z>=t:
        t = z
print(f);print(s);print(t) f, s, t = 3,2,1 f 3 s 2 t 1 for i in range(10):
    z = int(input())
    if z >= f:
        f,s,t = z, f, s;
    elif z>=s:
        s,t = z,s;
    elif z>=t:
        t = z i range(10) range 10 z = int(input()) z int(input()) int input() input if z >= f:
        f,s,t = z, f, s;
    elif z>=s:
        s,t = z,s;
    elif z>=t:
        t = z z >= f z f f,s,t = z, f, s f z s f t s elif z>=s:
        s,t = z,s;
     z>=s z s s,t = z,s s z t s elif z>=t:
        t = z z>=t z t t = z t z print(f) print f print(s) print s print(t) print t s, t = 3,2,1 2 s z = int(input()) int(input()) z s,t = z, f, s f s f,s,t = z, f, s z f t = z, f, s s t f, s, t = 3,2,1 3 f s,t = z,s z s t = z,s s t t = z z t t = 3,2,1 1 t
f, s, t = 3,2,1
for i in range(10):
    z = int(input())
    if z >= f:
        f,s,t = z, f, s;
    elif z>=s:
        s,t = z,s;
    elif z>=t:
        t = z
print(f);print(s);print(t)