#include<iostream>
using namespace std;
int main(){
char a[2];
while(cin>>a){
int temp;
for(int i=0; i<3; i++)
for(int j=0;j<3-i-1;j++)
if(a[i]>a[i+1])
{
temp=a[i];
a[i]=a[i+1];
a[i+1]=temp;
}
if(a[0]>a[1]){
temp=a[1];
a[1]=a[0];
a[0]=temp;
}
cout<<a[0]<<" "<<a[1]<<" "<<a[2]<<endl;
}
return 0;
}