#include <bits/stdc++.h> using namespace std; int main(){ string s; cin >> s; sort(s.begin(), s.end()); while(next_permutation(s.begin(), s.end())) cout << s << endl; return 0; }
hello
ehlol eholl elhlo elhol ellho elloh elohl elolh eohll eolhl eollh hello helol heoll hlelo hleol hlleo hlloe hloel hlole hoell holel holle lehlo lehol lelho leloh leohl leolh lhelo lheol lhleo lhloe lhoel lhole lleho lleoh llheo llhoe lloeh llohe loehl loelh lohel lohle loleh lolhe oehll oelhl oellh ohell ohlel ohlle olehl olelh olhel olhle olleh ollhe