#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int n, a[10], d = 1;
string s;
vector<string> res;
void saveString() {
string r = "";
for (int i = 0; i < n; i++)
if (a[i] == 1)
r += s[i];
if (find(res.begin(), res.end(), r) == res.end())
res.push_back(r);
}
void binary(int i) {
for (int j = 0; j <= 1; j++) {
a[i] = j;
if (i == n - 1)
saveString();
else
binary(i + 1);
}
}
int main() {
cin>> s;
n = s.length();
binary(0);
for (int i = 0; i < res.size(); i++)
cout << res[i] << endl;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8dmVjdG9yPgojaW5jbHVkZSA8YWxnb3JpdGhtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG4sIGFbMTBdLCBkID0gMTsKc3RyaW5nIHM7CnZlY3RvcjxzdHJpbmc+IHJlczsKCnZvaWQgc2F2ZVN0cmluZygpIHsgCiAgICBzdHJpbmcgciA9ICIiOwogICAgZm9yIChpbnQgaSA9IDA7IGkgPCBuOyBpKyspCiAgICAgICAgaWYgKGFbaV0gPT0gMSkKICAgICAgICAgICAgciArPSBzW2ldOwogICAgaWYgKGZpbmQocmVzLmJlZ2luKCksIHJlcy5lbmQoKSwgcikgPT0gcmVzLmVuZCgpKSAKICAgICAgICByZXMucHVzaF9iYWNrKHIpOyAKfQoKdm9pZCBiaW5hcnkoaW50IGkpIHsKICAgIGZvciAoaW50IGogPSAwOyBqIDw9IDE7IGorKykgewogICAgICAgIGFbaV0gPSBqOwogICAgICAgIGlmIChpID09IG4gLSAxKQogICAgICAgICAgICBzYXZlU3RyaW5nKCk7CiAgICAgICAgZWxzZQogICAgICAgICAgICBiaW5hcnkoaSArIDEpOwogICAgfQp9CgppbnQgbWFpbigpIHsKICAgIGNpbj4+IHM7CiAgICBuID0gcy5sZW5ndGgoKTsKICAgIGJpbmFyeSgwKTsKICAgIGZvciAoaW50IGkgPSAwOyBpIDwgcmVzLnNpemUoKTsgaSsrKQogICAgICAgIGNvdXQgPDwgcmVzW2ldIDw8IGVuZGw7Cn0K