#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 5;
bool d2[N], d3[N];
int main() {
  ios_base::sync_with_stdio(0);
  string s;
  cin >> s;
  s = s.substr(5, s.length() - 5);
  int n = s.length();
  set<string> ans;
  if (s.size() <= 1) {
    cout << 0;
    return 0;
  }
  if (s.size() == 2) {
    cout << 1 << endl << s;
    return 0;
  }
  ans.insert(s.substr(s.length() - 2, 2));
  ans.insert(s.substr(s.length() - 3, 3));
  d2[n - 2] = 1;
  d3[n - 3] = 1;
  for (int i = n - 4; i >= 0; i--) {
    if (d3[i + 2] || (d2[i + 2] && s.substr(i, 2) != s.substr(i + 2, 2))) {
      ans.insert(s.substr(i, 2));
      d2[i] = 1;
    }
    if (d2[i + 3] || (d3[i + 3] && s.substr(i, 3) != s.substr(i + 3, 3))) {
      ans.insert(s.substr(i, 3));
      d3[i] = 1;
    }
  }
  cout << ans.size() << endl;
  for (set<string>::iterator it = ans.begin(); it != ans.end(); it++) {
    cout << (*it) << endl;
  }
  return 0;
}
