#include <bits/stdc++.h>
using namespace std;
struct debugger {
  template <typename T>
  debugger& operator,(const T v) {
    cout << v << " ";
    return *this;
  }
} dbg;
const double pi = acos(-1.0);
const double eps = 1e-7;
template <class TT>
TT sqr(TT a) {
  return a * a;
}
template <class TT>
TT abs(TT a) {
  if (a < 0) return -a;
  return a;
}
const int S = 10100;
char in[S];
string w;
set<string> ans;
int n;
bool f[S];
void go(int l) {
  memset(f, false, sizeof(f));
  f[l] = true;
  for (int k = n - 2; k > 4; --k)
    for (int i = 2; i <= 3; i++)
      if (k + i <= l) {
        string now, pre;
        now = w.substr(k, i);
        if (k + 2 * i <= l) {
          pre = w.substr(k + i, i);
          if (now == pre) {
            if (f[k + 5]) {
              f[k] = true;
              ans.insert(now);
            }
          } else if (f[k + i]) {
            f[k] = true;
            ans.insert(now);
          }
        } else if (f[k + i]) {
          f[k] = true;
          ans.insert(now);
        }
      }
}
int main() {
  while (scanf("%s", in) == 1) {
    w = in;
    n = ((int)w.size());
    ans.clear();
    go(n);
    printf("%d\n", ((int)ans.size()));
    for (__typeof(ans.begin()) it = ans.begin(); it != ans.end(); ++it)
      printf("%s\n", (*it).c_str());
  }
  return 0;
}
