#include <bits/stdc++.h>
using namespace std;
string a, b, c;
int main() {
cin >> a >> b >> c;
string x1 = a + b + c;
string x2 = a + c + b;
string x3 = b + a + c;
string x4 = b + c + a;
string x5 = c + a + b;
string x6 = c + b + a;

string mx = max(max(max(max(max(x1, x2), x3),x4),x5),x6);

cout << mx;


return 0; }