#include <iostream>
#include <cstdint>
using namespace std;

int brCif(long int x){

    int d = 10;
    int n = 1;

    for (int i = 0; i < n; ++i){

        if (x >= d){
            ++n;
        }
        x = x / d;

    }
    return n;

}

int d(long int y){
    int d = 1;
    for(int i = 1; i < y; i++){
       d = d * 10;
    }
    return d;
}

int main(){

    long int a, b, c;
    cin >> a;
    cin >> b;
    cin >> c;

    long int abr, bbr, cbr;

    abr = d(brCif(a));
    bbr = d(brCif(b));
    cbr = d(brCif(c));
    int s = 1;
    long int veci, manji, vbr, mbr, brPuta;

    if(brCif(a) > brCif(b)){brPuta = brCif(a);}else {brPuta = brCif(b);}

    for(int i = 0; i < brPuta; ++i){
        if((abr / s) == 0){abr = abr * 10;}
        if((bbr / s) == 0){bbr = bbr * 10;}
        if((a / (abr / s)) > (b / (bbr / s))){
            veci = a;
            vbr = abr;
            manji = b;
            mbr = bbr;
            i = 10000000;
        } else if((a / (abr / s)) < (b / (bbr / s))){
            veci = b;
            manji = a;
            mbr = abr;
            vbr = bbr;
            i = 10000000;
        } else if((a / (abr / s)) == (b / (bbr / s))){
            if((i+1) == brPuta){
                veci = a;
                vbr = abr;
                manji = b;
                mbr = bbr;
            }
        }

        s = s * 10;

    }
    long int najveci, najmanji, srednji, drmanji, drbr;
    s = 1;

    if(brCif(veci) > brCif(c)){brPuta = brCif(veci);}else {brPuta = brCif(c);}

    for(int p = 0;p < brPuta; ++p){

        if((vbr / s) == 0){vbr = vbr * 10;}
        if((cbr / s) == 0){cbr = cbr * 10;}

        if((veci / (vbr / s)) > (c / (cbr / s))){
            najveci = veci;
            drmanji = c;
            drbr = cbr;
            p = 10000000;
        } else if((veci / (vbr / s)) < (c / (cbr / s))){
            najveci = c;
            drmanji = veci;
            drbr = vbr;
            p = 1000000;
        } else if((veci / (vbr / s)) == (c / (cbr / s))){
            if((p+1) == brPuta){
                najveci = veci;
                drmanji = c;
                drbr = cbr;
            }
        }
        s = s * 10;

    }
    s = 1;

    if(brCif(manji) > brCif(drmanji)){brPuta = brCif(manji);}else {brPuta = brCif(drmanji);}

    for(int v = 0; v < brPuta; ++v){

        if((mbr / s) == 0){mbr = mbr * 10;}
        if((drbr / s) == 0){drbr = drbr * 10;}

        if((drmanji / (drbr / s)) > (manji / (mbr / s))){
            najmanji = manji;
            srednji = drmanji;
            v = 1000000;
        } else if((drmanji / (drbr / s)) < (manji / (mbr / s))){
            najmanji = drmanji;
            srednji = manji;
            v = 1000000;
        } else if((drmanji / (drbr / s)) == (manji / (mbr / s))){
            if((v+1) == brPuta){
                najmanji = manji;
                srednji = drmanji;
            }
        }
        s = s * 10;

    }

    cout << najveci << srednji << najmanji;
    return 0;
}