#include<iostream>#include<algorithm>#include<cstring>using namespace std;int main(){ int n,i; char a[100000]; cin>>a; sort(a,a+strlen(a)); do{ cout<<a<<endl; }while(next_permutation(a,a+strlen(a))); return 0; }