#include <bits/stdc++.h>
using namespace std;
string word;
set<string> suffixes;
int dyn[10001][4];
void solution(int ind, int last) {
  if (ind < 6) {
    return;
  }
  if (dyn[ind][last]) {
    return;
  }
  dyn[ind][last] = 1;
  if (ind >= 6) {
    stringstream strStream;
    strStream << word[ind - 1] << word[ind];
    string suf = strStream.str();
    if (last == 2) {
      strStream.str(string());
      strStream << word[ind + 1] << word[ind + 2];
      if (suf != strStream.str()) {
        suffixes.insert(suf);
        solution(ind - 2, 2);
      }
    } else {
      suffixes.insert(suf);
      solution(ind - 2, 2);
    }
  }
  if (ind >= 7) {
    stringstream strStream;
    strStream << word[ind - 2] << word[ind - 1] << word[ind];
    string suf = strStream.str();
    if (last == 3) {
      strStream.str(string());
      strStream << word[ind + 1] << word[ind + 2] << word[ind + 3];
      if (suf != strStream.str()) {
        suffixes.insert(suf);
        solution(ind - 3, 3);
      }
    } else {
      suffixes.insert(suf);
      solution(ind - 3, 3);
    }
  }
  return;
}
int main() {
  memset(dyn, 0, sizeof(dyn));
  cin >> word;
  int length = (int)word.size();
  if (length < 6) {
    cout << 0;
  } else {
    int last = 0;
    solution(length - 1, last);
    int size = (int)suffixes.size();
    cout << size << endl;
    for (set<string>::iterator it = suffixes.begin(); it != suffixes.end();
         ++it) {
      cout << *it << endl;
    }
  }
  return 0;
}
