#include <bits/stdc++.h>
using namespace std;
string s;
set<string> vals;
int N;
vector<bool> seen;
map<pair<pair<int, int>, int>, bool> rem;
bool cansplit(int current, int prevl, int length) {
  pair<pair<int, int>, int> key = make_pair(make_pair(current, prevl), length);
  map<pair<pair<int, int>, int>, bool>::iterator it = rem.find(key);
  if (it != rem.end()) {
    return it->second;
  }
  if (current == N) {
    return true;
  }
  if (prevl == 0) {
    if (N - current - length >= 0) {
      bool ans = cansplit(current + length, length, 2);
      if (ans == false) {
        ans = cansplit(current + length, length, 3);
      }
      rem[make_pair(make_pair(current, prevl), length)] = ans;
      return ans;
    }
  }
  if (N - current - length >= 0) {
    if (length != prevl) {
      bool ans = cansplit(current + length, length, 2);
      if (ans == false) {
        ans = cansplit(current + length, length, 3);
      }
      rem[make_pair(make_pair(current, prevl), length)] = ans;
      return ans;
    } else {
      bool ok = false;
      for (int i = current - length; i < current; i++) {
        if (s[i] != s[i + length]) {
          ok = true;
        }
      }
      if (ok == false) {
        rem[make_pair(make_pair(current, prevl), length)] = false;
        return false;
      } else {
        bool ans = cansplit(current + length, length, 2);
        if (ans == false) {
          ans = cansplit(current + length, length, 3);
        }
        rem[make_pair(make_pair(current, prevl), length)] = ans;
        return ans;
      }
    }
  }
  rem[make_pair(make_pair(current, prevl), length)] = false;
  return false;
}
int main() {
  cin >> s;
  N = s.size();
  seen.resize(N, false);
  int current = N - 2;
  while (current > 4) {
    for (int l = 2; l <= 3; l++) {
      if (cansplit(current, 0, l)) {
        string newstr = "";
        for (int i = 0; i < l; i++) {
          newstr += s[current + i];
        }
        vals.insert(newstr);
      }
    }
    --current;
  }
  cout << vals.size() << endl;
  for (set<string>::iterator it = vals.begin(); it != vals.end(); it++) {
    cout << *it << endl;
  }
  return 0;
}
