#include <bits/stdc++.h>
using namespace std;
int can2[10007];
int can3[10007];
int main() {
  string s;
  set<string> ss;
  cin >> s;
  int n = s.size();
  if (n - 2 > 4) {
    can2[n - 2] = true;
    ss.insert(s.substr(n - 2, 2));
  }
  if (n - 3 > 4) {
    can3[n - 3] = true;
    ss.insert(s.substr(n - 3, 3));
  }
  for (int i = n - 4; i >= 5; --i) {
    if (can3[i + 2] or
        can2[i + 2] and (s[i] != s[i + 2] or s[i + 1] != s[i + 3])) {
      ss.insert(s.substr(i, 2));
      can2[i] = true;
    }
    if (can2[i + 3] or
        can3[i + 3] and (s[i] != s[i + 3] or s[i + 1] != s[i + 4] or
                         s[i + 2] != s[i + 5])) {
      ss.insert(s.substr(i, 3));
      can3[i] = true;
    }
  }
  cout << ss.size() << endl;
  for (auto i = ss.begin(); i != ss.end(); ++i) {
    cout << *i << endl;
  }
}
