#include <bits/stdc++.h>
using namespace std;
ifstream infile("input.txt");
int n;
string str;
set<string> setsuf;
int main() {
  string sstr;
  cin >> str;
  n = str.size();
  bool dp2[n], dp3[n];
  for (int m = 2; m < n - 4; m++) {
    if (m > 4) {
      sstr = str.substr(n - m, 2);
      if (dp3[m - 2] ||
          (dp2[m - 2] && str.substr(n - m, 2) != str.substr(n - m + 2, 2))) {
        setsuf.insert(sstr);
        dp2[m] = true;
      } else
        dp2[m] = false;
      sstr = str.substr(n - m, 3);
      if (dp2[m - 3] ||
          (dp3[m - 3] && str.substr(n - m, 3) != str.substr(n - m + 3, 3))) {
        setsuf.insert(sstr);
        dp3[m] = true;
      } else
        dp3[m] = false;
    } else if (m == 2) {
      sstr = str.substr(n - 2, 2);
      setsuf.insert(sstr);
      dp2[2] = true;
      dp3[2] = false;
    } else if (m == 3) {
      sstr = str.substr(n - 3, 3);
      setsuf.insert(sstr);
      dp3[3] = true;
      dp2[3] = false;
    } else if (m == 4) {
      sstr = str.substr(n - 4, 2);
      dp3[4] = false;
      if (sstr != str.substr(n - 2, 2)) {
        setsuf.insert(sstr);
        dp2[4] = true;
      } else
        dp2[4] = false;
    }
  }
  int k = setsuf.size();
  cout << k << endl;
  set<string>::iterator it = setsuf.begin();
  while (it != setsuf.end()) {
    cout << *it << endl;
    it++;
  }
}
