#include using namespace std; typedef long long ll; int main(){ int counter[26] = {}; int a, b, t; string c; a = b = t = 0; string s; cin >> s; for (char c : s) counter[c-'a']++; for (int i : counter){ if (i == 2) a++; else if (i == 1){ b++; c += t + 'a'; } t++; } cout << ( (a == 6 && b == 1) ? c : "Impossible" ) << endl; return 0; }