#include <bits/stdc++.h>
using namespace std;
void deba(int* a, int n) {
  cerr << "| ";
  for (int i = 0; i < (n); i++) cerr << a[i] << " ";
  cerr << "|" << endl;
}
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
const int INF = 1 << 30;
char s[12345];
vector<string> out;
vector<string> ou;
bool en(int k, int len) {
  if (len - k == 1) return false;
  if (len - k == 4) {
    if (s[k] == s[k + 2] && s[k + 1] == s[k + 3]) return false;
  }
  if (len - k == 6) {
    if (s[k] == s[k + 2] && s[k + 1] == s[k + 3] && s[k + 2] == s[k + 4] &&
        s[k + 3] == s[k + 5] && s[k] == s[k + 3] && s[k + 1] == s[k + 4] &&
        s[k + 2] == s[k + 5])
      return false;
  }
  for (int i = (k); i <= (len - 1); i++)
    if (s[i] != s[k]) return true;
  int f = len - k;
  int x = 9;
  while (x < 10010) {
    if (f == x) return false;
    x += 2;
    if (f == x) return false;
    x += 3;
  }
  return true;
}
int main() {
  scanf("%s", s);
  int len = strlen(s);
  cout.sync_with_stdio(false);
  if (len <= 6) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = (5); i <= (len - 1); i++) {
    if (i + 1 <= len - 1 && i + 1 != len - 2) {
      if (en(i + 2, len)) {
        string s1 = "";
        s1 += s[i];
        s1 += s[i + 1];
        out.push_back(s1);
      }
    }
    if (i + 2 <= len - 1 && i + 2 != len - 2) {
      if (en(i + 3, len)) {
        string s1 = "";
        s1 += s[i];
        s1 += s[i + 1];
        s1 += s[i + 2];
        out.push_back(s1);
      }
    }
  }
  sort(out.begin(), out.end());
  ou.push_back(out[0]);
  for (int i = (1); i <= ((int)out.size() - 1); i++) {
    if (out[i] != out[i - 1]) ou.push_back(out[i]);
  }
  cout << ou.size() << endl;
  for (int i = 0; i < (ou.size()); i++) cout << ou[i] << endl;
  return 0;
}
