#include <bits/stdc++.h>
using namespace std;
const int oo = (int)1e9;
const double PI = 2 * acos(0.0);
const double eps = 1e-9;
set<string> seen[10009], ret;
string s;
int n;
void dfs(int ind, string next) {
  if (!seen[ind].insert(next).second) return;
  if (ind - 2 > 4) {
    string x = "";
    x += s[ind - 2];
    x += s[ind - 1];
    if (x != next) {
      ret.insert(x);
      dfs(ind - 2, x);
    }
  }
  if (ind - 3 > 4) {
    string x = "";
    x += s[ind - 3];
    x += s[ind - 2];
    x += s[ind - 1];
    if (x != next) {
      ret.insert(x);
      dfs(ind - 3, x);
    }
  }
}
int main() {
  cin >> s;
  dfs(((int)s.size()), "");
  printf("%d\n", ((int)ret.size()));
  for (__typeof(ret.begin()) it = ret.begin(); it != ret.end(); ++it)
    printf("%s\n", it->c_str());
  return 0;
}
