#include <bits/stdc++.h>
using namespace std;
const int inf = 1000 * 1000 * 1000;
const long long inf64 = 1ll * inf * inf;
bool solve() {
  string s;
  cin >> s;
  set<string> ans;
  int n = (int)s.size();
  vector<char> can2(n + 1);
  vector<char> can3(n + 1);
  can2[n] = 1;
  can3[n] = 1;
  for (int i = n - 2; i >= 5; i--) {
    if (can3[i + 2] || can2[i + 2] && s.substr(i, 2) != s.substr(i + 2, 2))
      can2[i] = 1, ans.insert(s.substr(i, 2));
    if (i + 2 < n) {
      if (can2[i + 3] || can3[i + 3] && s.substr(i, 3) != s.substr(i + 3, 3))
        can3[i] = 1, ans.insert(s.substr(i, 3));
    }
  }
  cout << (int)ans.size() << '\n';
  for (auto i : ans) cout << i << '\n';
  return true;
}
int main() {
  solve();
  return 0;
}
