#include<iostream>
#include<cstring>
using namespace std;
char a[10005],b[10005];
bool f[10005];
int len;
void dfs(int t){
for(int i=0;i<len;i++){
if(f[a[i]]==0){
f[a[i]] = 1;
b[t] = a[i];
if(t==len-1){
cout<<b<<endl;
}
else{
dfs(t+1);
}
f[a[i]] = 0;
}
}
}
int main(){
cin>>a;
len = strlen(a);
dfs(0);
return 0;
}
02-17
501
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-27
125
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
08-17
120
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
07-27