#include <iostream>
using namespace std;
int main()
{
char a, b, c, temp;
while (cin >> a >> b >> c)
{
if (a > b)
{
temp = a;
a = b;
b = temp;
}
if (a > c)
{
temp = c;
c = a;
a = temp;
}
if (b>c)
{
temp = c;
c = b;
b = temp;
}
cout << a << " " << b << " " << c << endl;
}
return 0;
}