#include <bits/stdc++.h>
using namespace std;
int n, l;
set<string> ans;
string s;
map<pair<int, string>, int> mp;
bool solve(int idx, string tmp = "") {
  if (idx == s.size()) {
    return 1;
  }
  if (idx > s.size()) return 0;
  if (mp.count({idx, tmp})) {
    return mp[{idx, tmp}];
  }
  string s3, s2;
  bool x3, x2;
  x3 = x2 = 0;
  if (idx + 2 <= s.size()) {
    s2 = s.substr(idx, 2);
    if (s2 != tmp) {
      x2 = solve(idx + 2, s2);
    }
  }
  if (idx + 3 <= s.size()) {
    s3 = s.substr(idx, 3);
    if (s3 != tmp) {
      x3 = solve(idx + 3, s3);
    }
  }
  if (x2) ans.insert(s2);
  if (x3) ans.insert(s3);
  return mp[{idx, tmp}] = (x2 || x3);
}
int main() {
  cin >> s;
  if (s.size() < 7)
    cout << 0;
  else {
    for (int i = 5; i < s.size() - 1; i++) solve(i, "");
    cout << ans.size() << endl;
    for (auto i : ans) {
      cout << i << endl;
    }
  }
}
