#include using namespace std; using ll = long long; #define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i)) #define all(x) (x).begin(),(x).end() #define pb push_back #define fi first #define se second #define dbg(x) cout<<#x" = "<<((x))< ostream& operator<<(ostream& o, const pair &p){o<<"("< ostream& operator<<(ostream& o, const vector &v){o<<"[";for(T t:v){o<>s; int ct[26]={}; rep(i,s.size()) ++ct[s[i]-'a']; vector ans; rep(i,13) { ++ct[i]; bool ok = false; rep(j,13) { int t=0; rep(k,13) { if(j==k) t += (ct[k]==2); else t += (ct[k]==1); } if(t==13) { ok = true; break; } } if(ok) ans.pb('a'+i); --ct[i]; } if(!ans.size()) printf("Impossible\n"); else for(auto c:ans) printf("%c\n", c); return 0; }