#include using namespace std; typedef int ll; #define REP(i,n) FOR(i,0,n) #define FOR(i,a,b) for(ll i=a;i vi; typedef vector> vvi; const ll INF = (1ll << 30); typedef pair pii; struct Edge{ ll s,t,c; }; typedef vector> Graph; typedef vector vpii; int main() { string S; cin>>S; UM um; for(char c:S) um[c]++; UM um2; for(auto p:um) um2[p.second]++; if(um2[1]!=1||um2[2]!=6) { cout<<"Impossible"<