func_code_string: #include <bits/stdc++.h>   using namespace std;   int a, s, d[10004][2], f, g, h, j, k, l, i, n, m;   string x, z;   set<string> q;   bool chk(int idx, int dis) {     for (int i = idx; i < idx + dis; i++) {       if (x[i] != x[i + dis]) return true;     }     return false;   }   int main() {     cin >> x;     n = x.size();     if (n >= 7) {       d[n - 2][0] = 1;       z = z + x[n - 2] + x[n - 1];       q.insert(z);     }     if (n >= 8) {       d[n - 3][1] = 1;       z = x[n - 3] + z;       q.insert(z);     }     for (i = n - 4; i >= 5; i--) {       d[i][0] = d[i + 2][1];       if (chk(i, 2)) d[i][0] |= d[i + 2][0];       if (d[i][0]) {         z =   ;         z = z + x[i] + x[i + 1];         q.insert(z);       }       d[i][1] = d[i + 3][0];       if (chk(i, 3)) d[i][1] |= d[i + 3][1];       if (d[i][1]) {         z =   ;         z = z + x[i] + x[i + 1] + x[i + 2];         q.insert(z);       }     }     cout << q.size() << endl;     for (set<string>::iterator it = q.begin(); it != q.end(); it++) {       cout << *it << endl;     }   }   