#include <bits/stdc++.h>
using namespace std;
string s;
map<string, bool> Hash;
map<pair<int, int>, bool> HASH;
int spl[1000011], spr[1000011];
bool ck(int l, int r) {
  if (HASH[make_pair(l, r)] == true) return false;
  return true;
}
int main() {
  string a, b;
  cin >> s;
  int n = s.size();
  int q, p, l, r;
  q = 0;
  p = 0;
  if (n > 6) {
    a = "";
    a += s[n - 2];
    a += s[n - 1];
    Hash[a] = true;
    spl[++p] = n - 2;
    spr[p] = n - 1;
  }
  if (n > 7) {
    a = "";
    a += s[n - 3];
    a += s[n - 2];
    a += s[n - 1];
    Hash[a] = true;
    spl[++p] = n - 3;
    spr[p] = n - 1;
  }
  while (q < p) {
    b = "";
    q++;
    for (int i = spl[q]; i <= spr[q]; i++) b += s[i];
    r = spl[q] - 1;
    l = r - 1;
    if (l > 4 && ck(l, r)) {
      a = "";
      for (int i = l; i <= r; i++) a += s[i];
      if (a != b) {
        Hash[a] = true;
        HASH[make_pair(l, r)] = true;
        ++p;
        spl[p] = l;
        spr[p] = r;
      }
    }
    l = r - 2;
    if (l > 4 && ck(l, r)) {
      a = "";
      for (int i = l; i <= r; i++) a += s[i];
      if (a != b) {
        Hash[a] = true;
        HASH[make_pair(l, r)] = true;
        ++p;
        spl[p] = l;
        spr[p] = r;
      }
    }
  }
  cout << Hash.size() << endl;
  for (map<string, bool>::iterator it = Hash.begin(); it != Hash.end(); it++) {
    cout << it->first << endl;
  }
}
