#include <bits/stdc++.h>
using namespace std;
string s;
bool okay[10100];
vector<string> v[10100];
set<string> ans;
int main() {
  ios::sync_with_stdio(false);
  memset(okay, false, sizeof(okay));
  cin >> s;
  okay[s.size()] = true;
  for (int i = s.size() - 1; i >= 5; i--) {
    bool cond;
    if (okay[i + 2]) {
      cond = false;
      for (int j = 0; j < v[i + 2].size(); j++) {
        if (v[i + 2][j] != s.substr(i, 2)) {
          cond = true;
        }
      }
      if (cond || v[i + 2].size() == 0) {
        ans.insert(s.substr(i, 2));
        v[i].push_back(s.substr(i, 2));
        okay[i] = true;
      }
    }
    if (okay[i + 3]) {
      cond = false;
      for (int j = 0; j < v[i + 3].size(); j++) {
        if (v[i + 3][j] != s.substr(i, 3)) {
          cond = true;
        }
      }
      if (cond || v[i + 3].size() == 0) {
        ans.insert(s.substr(i, 3));
        v[i].push_back(s.substr(i, 3));
        okay[i] = true;
      }
    }
  }
  cout << ans.size() << endl;
  for (set<string>::iterator it = ans.begin(); it != ans.end(); it++) {
    cout << (*it) << endl;
  }
  return 0;
}
