#include <bits/stdc++.h>   using namespace std;   string A;   bool isPalindrome(int left, int right) {     while (left < right) {       if (A[left] != A[right]) return false;       left++, right--;     }     return true;   }   int main() {     ios_base::sync_with_stdio(0);     cin.tie(NULL);     cout.tie(NULL);     cin >> A;     int N = A.size();     int bonus = 0;     int ret = 0;     if (N % 2 == 1) bonus = 1;     N /= 2;     while (N > 0) {       if (isPalindrome(0, N - 1)) {         if (N % 2 == 1) {           N--;           bonus = 1;         } else           N /= 2;       } else {         ret = 1 + bonus;         break;       }     }     if (ret == 0)       cout <<  Impossible ;     else       cout << ret;     return 0;   }   