#include <bits/stdc++.h>
const int N = 12222;
const long long INF = 1e9 + 19;
using namespace std;
int f[N][10];
int main() {
  string s;
  getline(cin, s);
  int n = (int)s.size();
  f[n][2] = 1;
  f[n][3] = 1;
  for (int i = n - 2; i >= 5; i--) {
    for (int j = 2; j <= 3; j++) {
      for (int k = 2; k <= 3; k++) {
        if (i + k > n) continue;
        if (!f[i + k][k]) continue;
        string t1, t2;
        for (int e = i; e < i + k; e++) t1 += s[e];
        for (int e = i - j; e < i; e++) t2 += s[e];
        if (t1 == t2) continue;
        f[i][j] = 1;
      }
    }
  }
  set<string> ans;
  for (int i = 5; i <= n; i++) {
    for (int j = 2; j <= 3; j++) {
      if (!f[i][j]) continue;
      if (i - j < 5) continue;
      string t;
      for (int e = i - j; e < i; e++) t += s[e];
      ans.insert(t);
    }
  }
  cout << (int)ans.size() << endl;
  for (string s : ans) {
    puts(s.c_str());
  }
  return 0;
}
