lis=[];

for i in range(10):
    h=int(input());
    lis.append(h);
    
for i in range(10):
    for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
            
for i in range(3):
    print(lis[i]); lis=[] lis [] for i in range(10):
    h=int(input());
    lis.append(h);
     i range(10) range 10 h=int(input()) h int(input()) int input() input lis.append(h) lis.append lis append h for i in range(10):
    for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
             i range(10) range 10 for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
             j range(i+1,10) range i+1 i 1 10 if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
             lis[i]<lis[j] lis[i] lis i lis[j] lis j a=lis[i] a lis[i] lis i lis[i]=lis[j] lis[i] lis i lis[j] lis j lis[j]=a lis[j] lis j a for i in range(3):
    print(lis[i]); i range(3) range 3 print(lis[i]) print lis[i] lis i h=int(input()) int(input()) h a=lis[i] lis[i] a lis=[] [] lis
lis=[];

for i in range(10):
    h=int(input());
    lis.append(h);
    
for i in range(10):
    for j in range(i+1,10):
        if lis[i]<lis[j]:
            a=lis[i];
            lis[i]=lis[j];
            lis[j]=a;
            
for i in range(3):
    print(lis[i]);