#include <bits/stdc++.h>
using namespace std;
set<string> out;
string in;
set<pair<int, string> > visited;
void DP(int pos, string prev) {
  if (pos <= 5) return;
  pair<int, string> tmp = make_pair(pos, prev);
  if (visited.find(tmp) != visited.end()) return;
  visited.insert(tmp);
  string s = "";
  if (pos >= 6) {
    s = in.substr(pos - 1, 2);
    if (s != prev) {
      out.insert(s);
      DP(pos - 2, s);
    }
    if (pos >= 7) {
      s = in[pos - 2] + s;
      if (s != prev) {
        out.insert(s);
        DP(pos - 3, s);
      }
    }
  }
}
int main() {
  cin >> in;
  DP(in.size() - 1, "");
  cout << out.size() << "\n";
  for (auto it = out.begin(); it != out.end(); ++it) cout << (*it) << "\n";
  return 0;
}
