#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef long double ld;

int main(){
    ios_base::sync_with_stdio(false);
    cout.precision(10);
    cout<<fixed;

    string a, b, c;
    cin >> a >> b >> c;
    string s1 = a;
    string s2 = b;
    string s3 = c;
    string s4 = a;
    string s5 = b;
    string s6 = c;
    s1 += b;
    s1 += c;
    s2 += a;
    s2 += c;
    s3 += a;
    s3 += b;
    s4 += c;
    s4 += b;
    s5 += c;
    s5 += a;
    s6 += b;
    s6 += a;
    cout << max(s1, max(s2, max(s3, max(s4, max(s5, s6)))));
    return 0;
}