#include <bits/stdc++.h>
using namespace std;
string s;
set<string> ss;
bool vist[100005];
int main() {
  cin >> s;
  memset(vist, 0, sizeof(vist));
  vist[s.length()] = 1;
  for (int i = s.length() - 1; i > 4; --i) {
    if (vist[i + 2]) {
      string str = s.substr(i, 2);
      if (s.find(str, i + 2) != i + 2 || vist[i + 5]) {
        vist[i] = 1;
        ss.insert(str);
      }
    }
    if (vist[i + 3]) {
      string str = s.substr(i, 3);
      if (s.find(str, i + 3) != i + 3 || vist[i + 5]) {
        vist[i] = 1;
        ss.insert(str);
      }
    }
  }
  cout << ss.size() << endl;
  set<string>::iterator it;
  for (it = ss.begin(); it != ss.end(); it++) {
    cout << *it << endl;
  }
  return 0;
}
