#include <bits/stdc++.h>
using namespace std;
string s;
set<string> ans;
int dp[10009][5];
int f(int i, int last, string l = "") {
  if (i == s.length()) return 1;
  if (i == s.length() - 1) return 0;
  if (dp[i][last] != -1) return dp[i][last];
  string a;
  bool ok = 0;
  if (i + 1 < s.length()) {
    for (int j = 0; j < 2; j++) a += s[i + j];
    if (a != l) {
      if (f(i + 2, 2, a)) {
        ans.insert(a);
        ok = 1;
      }
    }
  }
  a.clear();
  if (i + 2 < s.length()) {
    for (int j = 0; j < 3; j++) a += s[i + j];
    if (a != l) {
      if (f(i + 3, 3, a)) {
        ans.insert(a);
        ok = 1;
      }
    }
  }
  return dp[i][last] = ok;
}
int main() {
  memset(dp, -1, sizeof dp);
  cin >> s;
  for (int i = 5; i < s.length(); i++) {
    f(i, 0);
  }
  cout << ans.size() << endl;
  set<string>::iterator itr = ans.begin();
  while (itr != ans.end()) {
    cout << *itr << endl;
    itr++;
  }
  return 0;
}
