#include <bits/stdc++.h>
using namespace std;
const int MAXN = 100005;
bitset<20000> g[MAXN];
bool f[MAXN];
int n, m;
char s[MAXN];
int calc(int x, int l) {
  int ret = 0;
  for (int i = 0; i < l; i++) {
    ret = ret * 27 + s[x + i] - 'a' + 1;
  }
  return ret;
}
string& mk(int x, int l) {
  string& ret = *(new string());
  for (int i = 0; i < l; i++) ret += s[x + i];
  return ret;
}
map<string, bool> ans;
int main() {
  scanf("%s", s);
  int n = strlen(s);
  if (n <= 8) {
    if (n <= 6)
      cout << 0 << endl;
    else if (n == 7)
      cout << 1 << endl << mk(n - 2, 2) << endl;
    else
      cout << 2 << endl
           << min(mk(n - 2, 2), mk(n - 3, 3)) << endl
           << max(mk(n - 2, 2), mk(n - 3, 3)) << endl;
    return 0;
  }
  f[n - 2] = f[n - 3] = true;
  g[n - 2][calc(n - 2, 2)] = g[n - 3][calc(n - 3, 3)] = 1;
  ans[mk(n - 2, 2)] = ans[mk(n - 3, 3)] = true;
  for (int i = n - 4; i >= 5; i--) {
    bool x1 = f[i + 2] && g[i + 2][calc(i, 2)] == 0, x2 = false;
    if (i + 3 < n) x2 = f[i + 3] && g[i + 3][calc(i, 3)] == 0;
    f[i] = x1 || x2;
    if (f[i]) {
      if (x1) ans[mk(i, 2)] = true;
      if (x2) ans[mk(i, 3)] = true;
      if (x1 ^ x2) {
        if (x1) {
          g[i] = g[i + 1];
          g[i][calc(i, 2)] = 1;
        } else {
          g[i] = g[i + 2];
          g[i][calc(i, 3)] = 1;
        }
      } else {
        g[i] = g[i + 1] & g[i + 2];
        if (g[i + 2][calc(i, 2)] == 1) g[i][calc(i, 2)] = 1;
        if (g[i + 1][calc(i, 3)] == 1) g[i][calc(i, 3)] = 1;
      }
    }
  }
  cout << ans.size() << endl;
  for (auto x : ans) cout << x.first << endl;
}
