f=s=t=0
for i in range(10):
    n=int(input())
    if(n > f):
        t = s
        s = f
        f = n
    elif(n > s):
        t = s
        s = n
    elif(n > t):
        t = n
print('%d\n%d\n%d'%(f,s,t)) f=s=t=0 f 0 =s=t=0 s 0 t for i in range(10):
    n=int(input())
    if(n > f):
        t = s
        s = f
        f = n
    elif(n > s):
        t = s
        s = n
    elif(n > t):
        t = n i range(10) range 10 n=int(input()) n int(input()) int input() input if(n > f):
        t = s
        s = f
        f = n
    elif(n > s):
        t = s
        s = n
    elif(n > t):
        t = n n > f n f t = s t s s = f s f f = n f n elif(n > s):
        t = s
        s = n
     n > s n s t = s t s s = n s n elif(n > t):
        t = n n > t n t t = n t n print('%d\n%d\n%d'%(f,s,t)) print '%d\n%d\n%d'%(f,s,t) '%d\n%d\n%d' (f,s,t) f s t t = s s t t = s s t s = f f s f=s=t=0 0 f t=0 0 t f = n n f s=t=0 0 s s = n n s t = n n t n=int(input()) int(input()) n
f=s=t=0
for i in range(10):
    n=int(input())
    if(n > f):
        t = s
        s = f
        f = n
    elif(n > s):
        t = s
        s = n
    elif(n > t):
        t = n
print('%d\n%d\n%d'%(f,s,t))