#include using namespace std; typedef long long ll; #define rep(i, n) for(ll i = 0, i##_len = (n); i < i##_len; i++) #define reps(i, s, n) for(ll i = (s), i##_len = (n); i < i##_len; i++) #define rrep(i, n) for(ll i = (n) - 1; i >= 0; i--) #define rreps(i, e, n) for(ll i = (n) - 1; i >= (e); i--) #define all(x) (x).begin(), (x).end() #define sz(x) ((ll)(x).size()) #define len(x) ((ll)(x).length()) int main() { cin.tie(0); ios::sync_with_stdio(false); // ifstream in("input.txt"); // cin.rdbuf(in.rdbuf()); string s; cin >> s; map cnt; rep(i, len(s)) cnt[s[i]]++; ll one = 0, two = 0; for(auto x : cnt) { if (x.second == 1) one++; else if (x.second == 2) two++; else { cout << "Impossible" << endl; return 0; } } if ((one == 11) && (two == 1)) { set se; rep(i, 'm' - 'a' + 1) se.insert((char)('a' + i)); for(auto x : cnt) se.erase(x.first); cout << (*se.begin()) << endl; } else if ((one == 13) && (two == 0)) { rep(i, 'm' - 'a' + 1) cout << (char)('a' + i) << endl; } else { cout << "Impossible" << endl; } return 0; }