#include <bits/stdc++.h>
using namespace std;
set<string> s;
const int maxn = 1E4 + 10;
int dp[maxn];
int main() {
  string str;
  cin >> str;
  memset(dp, 0, sizeof(dp));
  str = str.substr(5);
  int n = str.length();
  string tmp;
  dp[n] = 1;
  for (int i = n - 1; i >= 0; i--) {
    for (int l = 2; l <= 3; l++) {
      tmp = str.substr(i, l);
      if ((str.find(tmp, i + l) != i + l || dp[i + 5]) && dp[i + l]) {
        s.insert(tmp);
        dp[i] = 1;
      }
    }
  }
  cout << s.size() << "\n";
  for (set<string>::iterator its = s.begin(); its != s.end(); ++its) {
    cout << *its << "\n";
  }
  return 0;
}
