#include <bits/stdc++.h>
using namespace std;
void permutation(string s) {
transform(s.begin(), s.end(), s.begin(), ::tolower);
int len = s.length();
int total_sets = 1 << len;
for (int i = 0; i < total_sets; i++) {
string combination = s;
for (int j = 0; j < len; j++) {
if (((i >> j) & 1)) {
combination[j] = toupper(s.at(j));
}
}
cout << combination << endl;
}
}
int main()
{
permutation("abc");
return 0;
}
/*
run:
abc
Abc
aBc
ABc
abC
AbC
aBC
ABC
*/