1. C++, Evgeni Pavlidis

#include <iostream>
#include <list>

using namespace std;

list<char> pool;

void permutate(int pos)
{


}

void printPool()
{
int size = pool.size();
for(int i = 0; i < size; i++)
{
cout << pool.front();
pool.pop_front();
}
cout << endl;
}

int main()
{
int cases,n;
string str;
cin >> cases;


for(int c=1; c <= cases; c++)
{
pool.empty();
cin >> str;
cin >> n;
for(int i = 0; i < str.length(); i++)
pool.push_front(str[i]);

pool.sort();
permutate(0);

}
return 0;
}