func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MX = (int)2e5 + 10;   const int mod = (int)1e9 + 7;   bool check(string& t) {     bool ok = true;     int n = t.size();     for (int j = 0; j < n / 2; ++j) {       ok &= t[j] == t[n - j - 1];     }     return ok;   }   int main(int argc, char* argv[]) {     cin.tie(0);     cout.tie(0);     ios_base::sync_with_stdio(0);     string s;     cin >> s;     int n = s.size();     int it = 0;     while (it < n && s[it] == s[0]) it++;     if (it == n) {       cout <<  Impossible  << endl;       return 0;     }     for (int i = 1; i < n; ++i) {       string s1 = s.substr(0, i);       string s2 = s.substr(i);       string t = s2 + s1;       if (t != s && check(t)) {         cout << 1 << endl;         return 0;       }     }     if (n % 2 == 0) {       string sx = s.substr(0, n / 2);       if (!check(sx)) {         cout << 1 << endl;         return 0;       }     }     for (int i = 0; i < n / 2; ++i) {       string sx = s.substr(0, i + 1);       if (!check(sx)) {         cout << 2 << endl;         return 0;       }     }     cout <<  Impossible  << endl;     return 0;   }   