#include <iostream>
#include <algorithm>
#include <string>
#include <vector>
using namespace std;
int main() {
vector<string> s;
s.push_back("quick");
s.push_back("brown");
s.push_back("fox");
sort(s.begin(), s.end());
do {
for(int i = 0 ; i != s.size() ; i++) {
cout << s[i] << " ";
}
cout << endl;
} while (next_permutation(s.begin(), s.end()));
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8YWxnb3JpdGhtPgojaW5jbHVkZSA8c3RyaW5nPgojaW5jbHVkZSA8dmVjdG9yPgoKdXNpbmcgbmFtZXNwYWNlIHN0ZDsKCmludCBtYWluKCkgewogICAgdmVjdG9yPHN0cmluZz4gczsKICAgIHMucHVzaF9iYWNrKCJxdWljayIpOwogICAgcy5wdXNoX2JhY2soImJyb3duIik7CiAgICBzLnB1c2hfYmFjaygiZm94Iik7CiAgICBzb3J0KHMuYmVnaW4oKSwgcy5lbmQoKSk7CiAgICBkbyB7CiAgICAgICAgZm9yKGludCBpID0gMCA7IGkgIT0gcy5zaXplKCkgOyBpKyspIHsKICAgICAgICAgICAgY291dCA8PCBzW2ldIDw8ICIgIjsKICAgICAgICB9CiAgICAgICAgY291dCA8PCBlbmRsOwogICAgfSB3aGlsZSAobmV4dF9wZXJtdXRhdGlvbihzLmJlZ2luKCksIHMuZW5kKCkpKTsKCXJldHVybiAwOwp9