#include <bits/stdc++.h>
using namespace std;
int32_t dx[] = {2, 2, -2, -2, 1, 1, -1, -1};
int32_t dy[] = {1, -1, 1, -1, 2, -2, 2, -2};
int32_t main() {
  string s;
  cin >> s;
  long long n = s.length();
  set<string> str;
  vector<bool> dp1(n);
  vector<bool> dp2(n);
  dp1[n - 1] = dp2[n - 1] = false;
  for (long long i = n - 2; i >= 5; i--) {
    string st = s.substr(i, 2);
    if ((i + 1) == n - 1) {
      str.insert(st);
      dp1[i] = true;
      dp2[i] = false;
      continue;
    }
    if (dp2[i + 2] == true) {
      str.insert(st);
      dp1[i] = true;
    } else if (dp1[i + 2] == true &&
               (s[i] != s[i + 2] || s[i + 1] != s[i + 3])) {
      str.insert(st);
      dp1[i] = true;
    } else {
      dp1[i] = false;
    }
    st = s.substr(i, 3);
    if ((i + 2) == n - 1) {
      dp2[i] = true;
      str.insert(st);
      continue;
    } else if (dp1[i + 3] == true) {
      str.insert(st);
      dp2[i] = true;
    } else if (dp2[i + 3] == true &&
               (s[i] != s[i + 2] || s[i + 1] != s[i + 3] ||
                s[i + 2] != s[i + 4])) {
      dp2[i] = true;
      str.insert(st);
    } else {
      dp2[i] = false;
    }
  }
  cout << str.size() << endl;
  for (auto node : str) {
    cout << node << endl;
  }
}
