#include #define rep(i,n) for(int i=0;i<(int)(n);i++) using namespace std; using ll = long long ; using P = pair ; using pll = pair; constexpr int INF = 1e9; constexpr long long LINF = 1e17; constexpr int MOD = 1000000007; int main(){ vector a(26,0); string s; cin >> s; rep(i,13) a[s[i]-'a'] ++; bool ok = true; int c = 0; int idx = 0; rep(i,26){ if(a[i] > 2) ok = false; if(a[i]==1){ ++c; idx = i; } } if(ok && c==1){ cout << (char)('a'+idx) << endl; }else{ cout << "Impossible" << endl; } return 0; }