#include <bits/stdc++.h>

#define vi vector<int>
#define pb push_back

using namespace std;

typedef long long ll;

ll veci(ll a, ll b) {
    ll cpa = a, cpb = b;
    vi aCifre, bCifre;
    while (a > 0) {
        aCifre.pb(a%10);
        a /= 10;
    }
    while (b > 0) {
        bCifre.pb(b%10);
        b /= 10;
    }

    int aCifara = aCifre.size(), bCifara = bCifre.size();

    if (aCifara > bCifara) {
        for (int i = bCifara; i<aCifara; ++i) {
            bCifre.pb(bCifre[i-bCifara]);
        }
    }
    else if (bCifara > aCifara) {
        for (int i = aCifara; i<bCifara; ++i) {
            aCifre.pb(aCifre[i-aCifara]);
        }
    }

    for (int i = 0; i<aCifre.size(); i++) {
        if (aCifre[i] > bCifre[i])
            return cpa;
        else if (bCifre[i] > aCifre[i])
            return cpb;
    }
    return cpa;
}

ll manji(ll a, ll b) {
    ll cpa = a, cpb = b;
    vi aCifre, bCifre;
    while (a > 0) {
        aCifre.pb(a%10);
        a /= 10;
    }
    while (b > 0) {
        bCifre.pb(b%10);
        b /= 10;
    }

    int aCifara = aCifre.size(), bCifara = bCifre.size();

    if (aCifara > bCifara) {
        for (int i = bCifara; i<aCifara; ++i) {
            bCifre.pb(bCifre[i-bCifara]);
        }
    }
    else if (bCifara > aCifara) {
        for (int i = aCifara; i<bCifara; ++i) {
            aCifre.pb(aCifre[i-aCifara]);
        }
    }

    for (int i = 0; i<aCifre.size(); i++) {
        if (aCifre[i] > bCifre[i])
            return cpb;
        else if (bCifre[i] > aCifre[i])
            return cpa;
    }
    return cpa;
}

ll veci(ll a, ll b, ll c) {
    return veci(a, veci(b, c));
}



int main() {
    // hoodlum548<3
    ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr), cerr.tie(nullptr);
    ll a, b, c;
    cin >> a >> b >> c;
    if (veci(a, b, c) == a)
        cout << a << veci(b, c) << manji(b, c) << endl;
    else if(veci(a, b, c) == b)
        cout << b << veci(a, c) << manji(a, c) << endl;
    else
        cout << c << veci(a, b) << manji(a, b) << endl;
    return 0;
}