func_code_string: #include <bits/stdc++.h>   using namespace std;   const int MAXSIZE = 10000020;   int bufpos;   char buf[MAXSIZE];   void init() {     buf[fread(buf, 1, MAXSIZE, stdin)] =   0 ;     bufpos = 0;   }   int readint() {     int val = 0;     for (; !isdigit(buf[bufpos]); bufpos++)       ;     for (; isdigit(buf[bufpos]); bufpos++) val = val * 10 + buf[bufpos] -  0 ;     return val;   }   char readchar() {     for (; isspace(buf[bufpos]); bufpos++)       ;     return buf[bufpos++];   }   int readstr(char* s) {     int cur = 0;     for (; isspace(buf[bufpos]); bufpos++)       ;     for (; !isspace(buf[bufpos]); bufpos++) s[cur++] = buf[bufpos];     s[cur] =   0 ;     return cur;   }   char s[5003], w[5003];   int main() {     init();     int n = readstr(s + 1);     bool flag = true;     for (int i = 1; i <= n; i++) {       if (n % 2 == 1 && i * 2 == n + 1) continue;       if (s[i] != s[1]) {         flag = false;         break;       }     }     if (flag) return puts( Impossible ), 0;     for (int i = 1; i < n; i++) {       int cur = 0;       for (int j = i + 1; j <= n; j++) w[++cur] = s[j];       for (int j = 1; j <= i; j++) w[++cur] = s[j];       if (!strcmp(s + 1, w + 1)) continue;       bool flag = true;       for (int j = 1; j <= n; j++)         if (w[j] != w[n - j + 1]) {           flag = false;           break;         }       if (flag) return puts( 1 ), 0;     }     puts( 2 );   }   