func_code_string: #include <bits/stdc++.h>   using namespace std;   set<string> ans;   string a;   int dp[1000010][5];   int main() {     cin >> a;     int len = a.size();     reverse(a.begin(), a.end());     for (int i = 1; i < len - 5; ++i) {       if (i == 1) {         string s1 =   ;         s1 += a[i];         s1 += a[i - 1];         ans.insert(s1);         dp[1][0] = 1;       }       if (i == 2) {         string s1 =   ;         s1 += a[i];         s1 += a[i - 1];         s1 += a[i - 2];         ans.insert(s1);         dp[2][1] = 1;       }       if (i >= 3 && (a[i] != a[i - 2] || a[i - 1] != a[i - 3]) &&           dp[i - 2][0] == 1) {         string s1 =   ;         s1 += a[i];         s1 += a[i - 1];         ans.insert(s1);         dp[i][0] = 1;       }       if (i >= 2 && dp[i - 2][1] == 1) {         string s1 =   ;         s1 += a[i];         s1 += a[i - 1];         ans.insert(s1);         dp[i][0] = 1;       }       if (i - 3 >= 0 && dp[i - 3][0] == 1) {         string s1 =   ;         s1 += a[i];         s1 += a[i - 1];         s1 += a[i - 2];         ans.insert(s1);         dp[i][1] = 1;       }       if (i - 5 >= 0 &&           (a[i] != a[i - 3] || a[i - 1] != a[i - 4] || a[i - 2] != a[i - 5]) &&           dp[i - 3][1] == 1) {         string s1 =   ;         s1 += a[i];         s1 += a[i - 1];         s1 += a[i - 2];         ans.insert(s1);         dp[i][1] = 1;       }     }     cout << ans.size() << endl;     for (set<string>::iterator it = ans.begin(); it != ans.end(); ++it) {       cout << *it << endl;     }     return 0;   }   