#include<iostream>
#include<algorithm>
using namespace std;
int main()
{
char str[4];
while(cin>>str)
{
sort(str,str+3);
cout<<str[0]<<" "<<str[1]<<" "<<str[2]<<endl;
}
return 0;
}
#include<algorithm>
using namespace std;
int main()
{
char str[4];
while(cin>>str)
{
sort(str,str+3);
cout<<str[0]<<" "<<str[1]<<" "<<str[2]<<endl;
}
return 0;
}