func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 5023;   int grundy[N], canCut[N], mex[N];   void init() {     memset(grundy, 0, sizeof(grundy));     memset(canCut, 0, sizeof(canCut));     for (int i = 1; i < N; i++) {       for (int j = 0; j < i; j++) {         mex[grundy[max(0, j - 1)] ^ grundy[max(0, i - j - 2)]] = i;       }       for (int j = 0;; j++) {         if (mex[j] != i) {           grundy[i] = j;           break;         }       }     }   }   bool firstWin(int x, int n) {     int sg = 0, len = 0;     for (int i = 0; i < n; i++) {       if (canCut[i] && abs(x - i) > 1) {         len++;       } else {         sg ^= grundy[len];         len = 0;       }     }     return sg == 0;   }   int main() {     string s;     while (cin >> s) {       init();       int n = s.size();       for (int i = 1; i + 1 < n; i++) {         if (s[i - 1] == s[i + 1]) canCut[i] = 1;       }       int ans = -1;       for (int i = 0; i < n; i++) {         if (canCut[i] && firstWin(i, n)) {           ans = i + 1;           break;         }       }       if (ans == -1)         printf( Second n );       else         printf( First n%d n , ans);     }     return 0;   }   