#include <bits/stdc++.h>
using namespace std;
char s[10005];
set<string> str;
set<string>::iterator it;
string s2;
int mem[5][10005];
void mic(int op, int idx) {
  if (mem[op][idx] != 0) return;
  int keb = 0, yo = 0, ok = 0;
  for (int i = idx + 1; i <= idx + op; i++) keb = (keb * 29) + (s[i] - 'a');
  for (int i = 2; i <= 3; i++) {
    if (idx - i < 4) continue;
    if (i == op) {
      yo = 0;
      for (int j = idx - i + 1; j <= idx; j++) yo = (yo * 29) + (s[j] - 'a');
      if (yo != keb) {
        s2.clear();
        for (int j = idx - i + 1; j <= idx; j++) s2 += s[j];
        str.insert(s2);
        mic(i, idx - i);
      }
    } else {
      s2.clear();
      for (int j = idx - i + 1; j <= idx; j++) s2 += s[j];
      str.insert(s2);
      mic(i, idx - i);
    }
  }
  mem[op][idx] = 1;
}
int main() {
  int len;
  scanf("%s", s);
  len = strlen(s);
  if (len - 3 >= 4) {
    mic(2, len - 3);
    s2.clear();
    for (int j = len - 2; j < len; j++) s2 += s[j];
    str.insert(s2);
  }
  if (len - 4 >= 4) {
    mic(3, len - 4);
    s2.clear();
    for (int j = len - 3; j < len; j++) s2 += s[j];
    str.insert(s2);
  }
  cout << str.size() << "\n";
  for (it = str.begin(); it != str.end(); it++) cout << *it << "\n";
}
