#include <iostream>
#include <cstdio>
#include <algorithm>

using namespace std;

void toArray(unsigned long long a, int n, int *x) {
	int l = (int)log10(a) + 1;
	for (int i = l - 1; i >= 0; i--, a /= 10)
		x[i] = a % 10;
	for (int i = l; i < n; i++)
		x[i] = 0;
}

void output(int n, int *x) {
	for (int i = 0; i < n; i++)
		printf("%d", x[i]);
}

bool comp(int n, int *a, int *b) {
	int i;
	for (i = 0; i < n && a[i] == b[i]; i++);
	return a[i] > b[i];
}

int main() {
	unsigned long long a[3];
	cin >> a[0] >> a[1] >> a[2];
	int l[3], **x, n = 0, t[3];
	for (int i = 0; i < 3; i++) {
		l[i] = (int)log10(a[i]) + 1;
		n = max(n, l[i]);
		t[i] = i;
	}
	x = new int*[3];
	for (int i = 0; i < 3; i++) {
		x[i] = new int[n];
		toArray(a[i], n, x[i]);
	}

	if (comp(n, x[1], x[0]))
		swap(t[0], t[1]);
	if (comp(n, x[t[2]], x[t[0]]))
		swap(t[t[2]], t[t[0]]);
	if (comp(n, x[t[2]], x[t[1]]))
		swap(t[t[2]], t[t[1]]);
	for (int i = 0; i < 3; i++)
		output(l[t[i]], x[t[i]]);

	for (int i = 0; i < 3; i++)
		delete[] x[i];
	delete[] x;
	return 0;
}