#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e4 + 4;
string s;
bool can_split[4][MAXN];
int main() {
  ios_base::sync_with_stdio(0);
  cin >> s;
  int n = s.size();
  s += "$$$";
  can_split[2][n] = can_split[3][n] = 1;
  for (int i = n - 1; i > 4; i--) {
    for (int k = 2; k <= 3; k++) {
      bool same = (s.substr(i, k) == s.substr(i + k, k));
      for (int j = 2; j <= 3; j++)
        can_split[k][i] |= (can_split[j][i + k] && (j == k ? !same : 1));
    }
  }
  set<string> answ;
  for (int i = 0; i < n; i++) {
    for (int k = 2; k <= 3; k++) {
      if (can_split[k][i]) {
        answ.insert(s.substr(i, k));
      }
    }
  }
  cout << answ.size() << "\n";
  ;
  for (string t : answ) cout << t << "\n";
  return 0;
}
