#include <iostream>
#include <sstream>
#include <string>
#include <cstdlib>
#include <cmath>

using namespace std;

int main() {
    string a;
    string b;
    string c;
    string k1;
    string k2;
    string k3;
    string k4;
    string k5;
    string k6;
    string r;

    cin >> a;
    cin >> b;
    cin >> c;
    k1 = a + b + c;
    k2 = a + c + b;
    k3 = b + a + c;
    k4 = b + c + a;
    k5 = c + a + b;
    k6 = c + b + a;
    r = k1;
    if (r < k2) {
        r = k2;
    }
    if (r < k3) {
        r = k2;
    }
    if (r < k2) {
        r = k3;
    }
    if (r < k4) {
        r = k4;
    }
    if (r < k5) {
        r = k5;
    }
    if (r < k6) {
        r = k6;
    }
    cout << r << endl;
    return 0;
}