#include #include #include #include #include #include #include #include #include #include #include #include #include #define CK(N, A, B) (A <= N && N < B) #define REP(i, a, b) for (int i = a; i < b; i++) #define RREP(i, a, b) for (int i = (b - 1); a <= i; i--) #define F first #define S second #define ll long long const int INF = 1e9; const long long LLINF = 1e18; using namespace std; int dy[] = {0,1,0,-1}; int dx[] = {1,0,-1,0}; int dy8[] = {0,1,1,1,0,-1,-1,-1}; int dx8[] = {1,1,0,-1,-1,-1,0,1}; /*==================================================*/ /*variable*/ string S; map m; /*==================================================*/ /*function*/ /*==================================================*/ int main() { cin>>S; REP(i,0,S.size()){ m[S[i]]++; } char ans; int cnt = 0; auto itr = m.begin(); while(itr != m.end()){ if((*itr).S == 2) cnt++; if((*itr).S == 1) ans = (*itr).F; itr++; } if(cnt != 6){ cout<<"Impossible"<