#include <stdio.h>

int p=0;
void cif(long long unsigned n,int x[]){
    if(n<10){
        x[p]=n;p++;
    }
    else{
        cif(n/10,x);
        x[p]=n%10;p++;
    }
}
int *p1,*p2;
void uporedi(int a[],int b[]){
    int i=0;
        while(a[i]<10 && b[i]<10 && i<19){
            if(a[i]<b[i]){
                p1=b;p2=a;return;
            }
            else if(a[i]>b[i]){
                p1=a;p2=b;return;
            }
            else{
                p1=a;p2=b;
            }
            i++;
        }
        if(i==19){
            p1=a;p2=b;
        }
        else if(a[i]>=10){
            p1=b;p2=a;
        }
        else{
            p1=a;p2=b;
        }
    }

int main()
{
    long long unsigned A,B,C;
    scanf("%llu %llu %llu",&A,&B,&C);
    int a[19],b[19],c[19];
    for(int i=0;i<19;i++){
        a[i]=10;b[i]=10;c[i]=10;
    }
    cif(A,a);p=0;
    cif(B,b);p=0;
    cif(C,c);p=0;
    int *pr,*dr,*tr;
    uporedi(a,b);dr=p1;tr=p2;
    uporedi(c,dr);pr=p1;dr=p2;
    uporedi(dr,tr);dr=p1;tr=p2;
    while(pr[p]<10 && p<19){
        printf("%d",pr[p++]);
    } p=0;
    while(dr[p]<10 && p<19){
        printf("%d",dr[p++]);
    } p=0;
    while(tr[p]<10 && p<19){
        printf("%d",tr[p++]);
    } p=0;
    return 0;
}