#include <bits/stdc++.h>
using namespace std;
char ss[11111];
string s;
int n;
set<string> used;
int can2[11111];
int can3[11111];
int main() {
  scanf("%s", ss);
  s = ss;
  n = (int)(s).size();
  can2[n - 2] = 1;
  can3[n - 3] = 1;
  for (int i = n - 4; i >= 5; --i) {
    if (((s[i] != s[i + 2] || s[i + 1] != s[i + 3]) && can2[i + 2]) ||
        can3[i + 2]) {
      can2[i] = 1;
    }
    if (((s[i] != s[i + 3] || s[i + 1] != s[i + 4] || s[i + 2] != s[i + 5]) &&
         can3[i + 3]) ||
        can2[i + 3]) {
      can3[i] = 1;
    }
  }
  for (int i = 5; i < n; ++i) {
    if (can2[i]) used.insert(s.substr(i, 2));
    if (can3[i]) used.insert(s.substr(i, 3));
  }
  printf("%d\n", (int)(used).size());
  for (set<string>::iterator it = used.begin(); it != used.end(); ++it) {
    printf("%s\n", (*it).c_str());
  }
}
