#include <bits/stdc++.h>
using namespace std;
const int MAXN = 10014, INF = 2 * (int)1e9;
string s;
int f[MAXN][4];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> s;
  int n = s.size();
  s = s + "______";
  set<string> stset;
  f[n][2] = f[n][3] = 1;
  for (int i = n - 1; i >= 5; i--) {
    if ((f[i + 2][2] && (s[i] != s[i + 2] || s[i + 1] != s[i + 3])) ||
        (f[i + 2][3])) {
      f[i][2] = 1;
      stset.insert(s.substr(i, 2));
    }
    if ((f[i + 3][3] &&
         (s[i] != s[i + 3] || s[i + 1] != s[i + 4] || s[i + 2] != s[i + 5])) ||
        (f[i + 3][2])) {
      f[i][3] = 1;
      stset.insert(s.substr(i, 3));
    }
  }
  cout << stset.size() << "\n";
  for (string t : stset) {
    cout << t << "\n";
  }
  return 0;
}
