#include <bits/stdc++.h>
using namespace std;
string s;
set<string> mem;
void solve(int N) {
  int n = (int)s.length();
  vector<bool> can2(n, false), can3(n, false);
  if (N + 2 < n) can2[N + 2] = true;
  if (N + 3 < n) can3[N + 3] = true;
  for (int i = N + 4; i < n; i++) {
    string cur2 = s.substr(i - 1, 2), cur3 = s.substr(i - 2, 3);
    can2[i] = can2[i - 2] || can3[i - 2];
    can3[i] = can2[i - 3] || can3[i - 3];
  }
  vector<bool> rcan2(n, false), rcan3(n, false);
  if (N + 2 < n) rcan2[n - 2] = true;
  if (N + 3 < n) rcan3[n - 3] = true;
  for (int i = n - 4; i > N; i--) {
    string cur2 = s.substr(i, 2), cur3 = s.substr(i, 3);
    rcan2[i] =
        (rcan2[i + 2] && s.substr(i, 2) != s.substr(i + 2, 2)) || rcan3[i + 2];
    rcan3[i] =
        rcan2[i + 3] || (rcan3[i + 3] && s.substr(i, 3) != s.substr(i + 3, 3));
  }
  for (int i = N + 1; i < n; i++) {
    if (i + 1 < n && can2[i + 1] && rcan2[i]) mem.insert(s.substr(i, 2));
    if (i + 2 < n && can3[i + 2] && rcan3[i]) mem.insert(s.substr(i, 3));
  }
}
int main() {
  cin >> s;
  solve(4);
  solve(5);
  cout << (int)mem.size() << endl;
  for (string str : mem) cout << str << endl;
  return 0;
}
