#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  s += "###";
  reverse(s.begin(), s.end());
  set<string> suff;
  bool d[2][s.length() + 10];
  for (int i = 0; i < 2; i++) {
    for (int j = 0; j < s.length() + 10; j++) {
      d[i][j] = 0;
    }
  }
  if (s.length() - 3 > 6) {
    d[0][3] = 1;
  }
  if (s.length() - 3 > 7) {
    d[1][3] = 1;
  }
  d[1][5] = 0;
  d[1][2] = 1;
  for (int i = 3 + 1; i < s.length(); i++) {
    if (i + 2 > s.length() - 5) {
      d[0][i] = 0;
      d[1][i] = 0;
      continue;
    }
    if (i + 3 > s.length() - 5) {
      d[1][i] = 0;
    } else {
      d[1][i] =
          d[0][i - 2] || (d[1][i - 3] and s.substr(i, 3) != s.substr(i - 3, 3));
    }
    d[0][i] = d[1][i - 3] && i - 3 > 2 ||
              (d[0][i - 2] and s.substr(i, 2) != s.substr(i - 2, 2));
  }
  string f;
  for (int i = 3; i < s.length(); i++) {
    if (d[0][i])
      f = s.substr(i, 2), reverse(f.begin(), f.end()), suff.insert(f);
    if (d[1][i])
      f = s.substr(i, 3), reverse(f.begin(), f.end()), suff.insert(f);
  }
  cout << suff.size() << endl;
  for (string x : suff) {
    cout << x << endl;
  }
  return 0;
}
