#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <cstdio>
#include <cstring>
using namespace std;

char s[210];

int main()
{
    while(~scanf("%s", s))
    {
        int n = strlen(s);
        sort(s, s+n);
        do
        {
            printf("%s\n", s);
        }while(next_permutation(s, s+n));
    }
    return 0;
}
posted on 2012-09-24 17:18  有间博客  阅读(108)  评论(0编辑  收藏  举报