#include <bits/stdc++.h>
using namespace std;
bool f[10010][4];
set<string> ret;
int main() {
  string s, suffix;
  cin >> s;
  int n = s.size();
  f[n - 2][2] = true, f[n - 3][3] = true;
  for (int i = n - 2; i > 4; i--) {
    if (f[i + 2][3]) f[i][2] = true;
    if (f[i + 3][2]) f[i][3] = true;
    if (f[i + 2][2] && (s.substr(i, 2).compare(s.substr(i + 2, 2)) != 0))
      f[i][2] = true;
    if (f[i + 3][3] && (s.substr(i, 3).compare(s.substr(i + 3, 3)) != 0))
      f[i][3] = true;
    if (f[i][2]) ret.insert(s.substr(i, 2));
    if (f[i][3]) ret.insert(s.substr(i, 3));
  }
  printf("%d\n", ret.size());
  for (set<string>::iterator it = ret.begin(); it != ret.end(); it++)
    printf("%s\n", it->c_str());
  return 0;
}
