#include <bits/stdc++.h>
using namespace std;
int visit[10009][5];
int solu;
set<string> ss;
void solve(string s, string last) {
  if (visit[s.length()][last.length()])
    return;
  else {
    visit[s.length()][last.length()] = 1;
    if (s.length() >= 7) {
      string s1 = s.substr(0, s.length() - 2);
      string s2 = s.substr(s.length() - 2, 2);
      if (s2 != last) {
        solve(s1, s2);
        ss.insert(s2);
      }
    }
    if (s.length() >= 8) {
      string s1 = s.substr(0, s.length() - 3);
      string s2 = s.substr(s.length() - 3, 3);
      if (s2 != last) {
        solve(s1, s2);
        ss.insert(s2);
      }
    }
  }
}
int main() {
  string s;
  cin >> s;
  solve(s, "");
  cout << ss.size() << endl;
  for (auto i = ss.begin(); i != ss.end(); i++) {
    cout << *(i) << endl;
  }
  return 0;
}
