#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  cin >> s;
  int len = s.length();
  vector<string> du(s.length(), "");
  vector<string> tr(s.length(), "");
  set<string> res;
  for (int i = s.length() - 1; i >= 5; i--) {
    string dob = s.substr(i, 2);
    string tri = s.substr(i, 3);
    if (dob.length() == 2) {
      if (i + 2 == len) {
        res.insert(dob);
        du[i] = dob;
      } else if (i + 2 < len &&
                 ((dob != du[i + 2] && du[i + 2] != "") || (tr[i + 2] != ""))) {
        res.insert(dob);
        du[i] = dob;
      }
    }
    if (tri.length() == 3) {
      if (i + 3 == len) {
        res.insert(tri);
        tr[i] = tri;
      } else if (i + 3 < len &&
                 ((tri != tr[i + 3] && tr[i + 3] != "") || (du[i + 3] != ""))) {
        res.insert(tri);
        tr[i] = tri;
      }
    }
  }
  cout << res.size() << endl;
  for (auto i = res.begin(); i != res.end(); i++) cout << *i << endl;
  return 0;
}
