#include <bits/stdc++.h>   using namespace std;   template <class T, class U>   inline void chmin(T &t, U f) {     if (t > f) t = f;   }   template <class T, class U>   inline void chmax(T &t, U f) {     if (t < f) t = f;   }   long long N;   char S[11111];   long long ex[27 * 26 * 26];   long long dp[11111][2];   long long get(long long l, long long r) {     if (r > N) return -1;     long long x = 0;     for (long long i = l; i < r; i++) {       x = x * 26 + (S[i] -  a );     }     if (r - l == 2) x += 26 * 26 * 26;     return x;   }   signed main() {     scanf( %s , S);     N = strlen(S);     if (N <= 6) {       puts( 0 );       return 0;     }     if (N == 7) {       puts( 1 );       printf( %s , S + 5);       return 0;     }     ex[get(N - 2, N)] = true;     ex[get(N - 3, N)] = true;     dp[N - 2][0] = true;     dp[N - 3][1] = true;     for (long long i = N - 4; i >= 5; i--) {       long long t2 = get(i, i + 2);       long long t3 = get(i, i + 3);       if (t2 == get(i + 2, i + 4))         dp[i][0] = dp[i + 2][1];       else         dp[i][0] = dp[i + 2][0] | dp[i + 2][1];       if (t3 == get(i + 3, i + 6))         dp[i][1] = dp[i + 3][0];       else         dp[i][1] = dp[i + 3][0] | dp[i + 3][1];       if (dp[i][0]) ex[t2] = true;       if (dp[i][1]) ex[t3] = true;     }     vector<string> vec;     for (long long i = 0; i < (26); i++)       for (long long j = 0; j < (26); j++)         if (ex[26 * 26 * 26 + i * 26 + j])           vec.push_back(string(1,  a  + i) + string(1,  a  + j));     for (long long i = 0; i < (26); i++)       for (long long j = 0; j < (26); j++)         for (long long k = 0; k < (26); k++)           if (ex[i * 26 * 26 + j * 26 + k])             vec.push_back(string(1,  a  + i) + string(1,  a  + j) +                           string(1,  a  + k));     sort((vec).begin(), (vec).end());     printf( %lld n , (long long)vec.size());     for (long long i = 0; i < (vec.size()); i++) printf( %s n , vec[i].c_str());     return 0;   }   