#include <bits/stdc++.h>
using namespace std;
int dp[4][10100];
char str[10100];
int n;
set<string> S;
int get(int bad, int pos) {
  if (pos == n) return 1;
  if (pos > n) return 0;
  if (dp[bad][pos] + 1) return dp[bad][pos];
  int r = 0;
  if (bad != 2) {
    int u = 1;
    if (str[pos] != str[pos + 2] || str[pos + 1] != str[pos + 3]) u = 0;
    if (get(u * 2, pos + 2)) {
      string p;
      p.push_back(str[pos]);
      p.push_back(str[pos + 1]);
      S.insert(p);
      ;
      r = 1;
    }
  }
  if (bad != 3) {
    int u = 1;
    if (str[pos] != str[pos + 3] || str[pos + 1] != str[pos + 4] ||
        str[pos + 2] != str[pos + 5])
      u = 0;
    if (get(u * 3, pos + 3)) {
      string p;
      p.push_back(str[pos]);
      p.push_back(str[pos + 1]);
      p.push_back(str[pos + 2]);
      ;
      S.insert(p);
      r = 1;
    }
  };
  return dp[bad][pos] = r;
}
int main() {
  scanf(" %s", str);
  n = strlen(str);
  memset(dp, -1, sizeof(dp));
  for (int i = 5; i < n; i++) get(0, i);
  printf("%d\n", (int)S.size());
  for (set<string>::iterator it = S.begin(); it != S.end(); it++)
    cout << *it << endl;
}
