func_code_string: #include <bits/stdc++.h>   using namespace std;   const int N = 400010;   const int P = 1000000007;   int m, n, mi[N], l[N], r[N];   char a[N], ans[N];   bool Check(int t, int x) {     if (++t < x) return 0;     return ((r[t] - r[t - x] * mi[x]) * mi[t - x] == l[t] - l[t - x]);   }   bool Dfs(int k, bool has) {     if (k == n) {       puts(ans);       return true;     }     for (ans[k] = (has ? a[k] :  a ); ans[k] <=  z ; ++ans[k]) {       l[k + 1] = l[k] + ans[k] * mi[k];       r[k + 1] = r[k] * P + ans[k];       if (!Check(k, m) && !Check(k, m + 1) && Dfs(k + 1, has && (a[k] == ans[k])))         return true;     }     return false;   }   int main() {     scanf( %d%s , &m, a);     int i;     for (i = (n = strlen(a)) - 1; i >= 0 && a[i] ==  z ; --i) a[i] =  a ;     if (i < 0) {       puts( Impossible );       return 0;     }     ++a[i];     mi[0] = 1;     for (int i = 1; i <= n; ++i) mi[i] = mi[i - 1] * P;     if (!Dfs(0, 1)) puts( Impossible );     return 0;   }   