#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  set<string> res;
  int l = s.length();
  int i;
  int pos[l][4];
  memset(pos, 0, sizeof(pos));
  if (l >= 7) {
    res.insert(s.substr(l - 2, 2));
  }
  if (l >= 8) {
    res.insert(s.substr(l - 3, 3));
  }
  pos[l - 2][2] = 1;
  pos[l - 3][3] = 1;
  for (i = l - 4; i > 4; i--) {
    if (pos[i + 2][3]) {
      pos[i][2] = 1;
      res.insert(s.substr(i, 2));
    } else if (pos[i + 2][2] && (s[i] != s[i + 2] || s[i + 1] != s[i + 3])) {
      pos[i][2] = 1;
      res.insert(s.substr(i, 2));
    }
    if (pos[i + 3][2]) {
      pos[i][3] = 1;
      res.insert(s.substr(i, 3));
    } else if (pos[i + 3][3] && (s[i] != s[i + 3] || s[i + 1] != s[i + 4] ||
                                 s[i + 2] != s[i + 5])) {
      pos[i][3] = 1;
      res.insert(s.substr(i, 3));
    }
  }
  cout << res.size() << endl;
  set<string>::iterator it;
  for (it = res.begin(); it != res.end(); it++) {
    cout << *it << endl;
  }
  return 0;
}
