#include <bits/stdc++.h>
using namespace std;
int good[100000][2];
int main() {
  std::ios::sync_with_stdio(false);
  string word;
  cin >> word;
  set<string> suff;
  if (word.length() <= 6) {
    cout << 0 << endl;
    return 0;
  }
  int last = word.length() - 1;
  for (int i = last - 1; i >= 5; i--) {
    if (i + 2 == last + 1) {
      suff.insert(word.substr(i, 2));
      good[i][0] = 1;
    } else if (i + 3 == last + 1) {
      suff.insert(word.substr(i, 3));
      good[i][1] = 1;
    } else {
      string w2 = word.substr(i, 2);
      if ((good[i + 2][0] && w2 != word.substr(i + 2, 2)) || good[i + 2][1]) {
        good[i][0] = 1;
        suff.insert(w2);
      }
      w2 = word.substr(i, 3);
      if (good[i + 3][0] || (good[i + 3][1] && w2 != word.substr(i + 3, 3))) {
        good[i][1] = 1;
        suff.insert(w2);
      }
    }
  }
  cout << suff.size() << endl;
  set<string>::iterator it;
  vector<string> res(suff.size());
  int i = 0;
  for (it = suff.begin(); it != suff.end(); it++, i++) {
    res[i] = *it;
  }
  sort(res.begin(), res.end());
  for (int i = 0; i < res.size(); ++i) {
    cout << res[i] << endl;
  }
  return 0;
}
