#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  int i, j, k, l, m, n;
  cin >> s;
  n = s.size();
  if (n <= 6) {
    cout << 0 << "\n";
    return 0;
  }
  set<string> myset;
  vector<bool> dp2(n, false);
  vector<bool> dp3(n, false);
  if (n >= 7) {
    dp2[n - 2] = true;
    myset.insert(s.substr(n - 2, 2));
  }
  if (n >= 8) {
    dp3[n - 3] = true;
    myset.insert(s.substr(n - 3, 3));
  }
  for (i = n - 4; i > 4; i--) {
    dp2[i] =
        (dp3[i + 2] || (dp2[i + 2] && s.substr(i, 2) != s.substr(i + 2, 2)));
    if (dp2[i]) myset.insert(s.substr(i, 2));
    if (i + 5 <= n - 1)
      dp3[i] =
          (dp2[i + 3] || (dp3[i + 3] && s.substr(i, 3) != s.substr(i + 3, 3)));
    else
      dp3[i] = (dp2[i + 3] || dp3[i + 3]);
    if (dp3[i]) myset.insert(s.substr(i, 3));
  }
  cout << myset.size() << "\n";
  for (auto x : myset) cout << x << "\n";
  return 0;
}
