#include <stdio.h>
#include <algorithm>
#include <string>
using namespace std;

int main()
{
	char a[20];
	char b[20];
	char c[20];
	scanf("%s %s %s", a, b, c);
	if (lexicographical_compare(a, a + strlen(a), b, b + strlen(b))) 
	{
		if (lexicographical_compare(b, b + strlen(b), c, c + strlen(c))) 
		{
			printf("%s%s%s", c, b, a);
		}
		else 
		{
			if (lexicographical_compare(a, a + strlen(a), c, c + strlen(c))) 
			{
				printf("%s%s%s", b, c, a);
			}
			else 
			{
				printf("%s%s%s", b, a, c);
			}
		}
	}
	else 
	{
		if (lexicographical_compare(a, a + strlen(a), c, c + strlen(c))) 
		{
			printf("%s%s%s", c, a, b);
		}
		else 
		{
			if (lexicographical_compare(b, b + strlen(b), c, c + strlen(c))) 
			{
				printf("%s%s%s", a, c, b);
			}
			else 
			{
				printf("%s%s%s", a, b, c);
			}
		}
	}
}