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

typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
#define s(x) scanf("%d",&x);
#define pb push_back
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
const int MAXN = 2e5+100;

string s[6], arr[3];

int main(int argc, char** argv) {
	cin >> arr[0] >> arr[1] >> arr[2];
	s[0] = arr[0] + arr[1] + arr[2];
	s[1] = arr[0] + arr[2] + arr[1];
	s[2] = arr[1] + arr[0] + arr[2];
	s[3] = arr[1] + arr[2] + arr[0];
	s[4] = arr[2] + arr[1] + arr[0];
	s[5] = arr[2] + arr[0] + arr[1];
	cout << *max_element(s, s+6);
	return 0;
}