#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int n = s.length();
  if (n <= 6) {
    cout << 0;
    return 0;
  }
  map<string, int> m;
  vector<string> v;
  v.clear();
  string tmp = "";
  int i;
  bool a[n + 1], b[n + 1];
  a[n - 1] = false;
  b[n - 1] = false;
  b[n - 2] = false;
  b[n] = false;
  a[n] = true;
  m[s.substr(n - 2, 2)] = 1;
  a[n - 2] = true;
  for (i = n - 3; i >= 5; --i) {
    a[i] = b[i + 2] ||
           (a[i + 2] && s.substr(i, 2).compare(s.substr(i + 2, 2)) != 0);
    b[i] = a[i + 3] ||
           (b[i + 3] && s.substr(i, 3).compare(s.substr(i + 3, 3)) != 0);
    if (a[i]) {
      tmp = s.substr(i, 2);
      m[tmp] = 1;
    }
    if (b[i]) {
      tmp = s.substr(i, 3);
      m[tmp] = 1;
    }
  }
  map<string, int>::iterator it = m.begin();
  cout << m.size() << endl;
  for (it = m.begin(); it != m.end(); ++it) std::cout << it->first << endl;
  return 0;
}
