#include <bits/stdc++.h>
using namespace std;
const long long MAXN = 1e5 + 10;
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
long long se[26][26][26], du[26][26], q[MAXN];
string v[MAXN], dp[MAXN];
int main() {
  string s;
  cin >> s;
  long long k = 0;
  q[s.size()] = 2;
  for (int i = s.size() - 2; i >= 5; i--) {
    long long a = int(s[i]) - 97, b = int(s[i + 1]) - 97,
              c = int(s[i + 2]) - 97;
    string o = s.substr(i, 3);
    if (q[i + 3] == 2) {
      if (!se[a][b][c]) {
        se[a][b][c] = 1;
        v[k] = o;
        k++;
      }
      q[i] = 1;
      dp[i] = o;
    } else if (q[i + 3] == 1 && o != dp[i + 3]) {
      if (!se[a][b][c]) {
        se[a][b][c] = 1;
        v[k] = o;
        k++;
      }
      q[i] = 1;
      dp[i] = o;
    }
    o = s.substr(i, 2);
    if (q[i + 2] == 2) {
      if (!du[a][b]) {
        du[a][b] = 1;
        v[k] = o;
        k++;
      }
      q[i]++;
      dp[i] = o;
    } else if (q[i + 2] == 1 && o != dp[i + 2]) {
      if (!du[a][b]) {
        du[a][b] = 1;
        v[k] = o;
        k++;
      }
      q[i]++;
      dp[i] = o;
    }
  }
  sort(v, v + k);
  cout << k << '\n';
  for (int i = 0; i < k; i++) {
    cout << v[i] << '\n';
  }
}
