#include <bits/stdc++.h>
using namespace std;
map<string, int> M;
int DP[10011][2];
char S[10011];
bool check(int i, int j, int len) {
  for (int x = (1); x <= (len); x++)
    if (S[i + x - 1] != S[j + x - 1]) return 1;
  return 0;
}
int main() {
  scanf("%s", S + 1);
  int n = strlen(S + 1);
  DP[n - 1][0] = 1;
  DP[n - 2][1] = 1;
  for (int i = (n); i >= (6); i--) {
    char cc[5] = {};
    if (i + 2 <= n) {
      if (DP[i + 2][1] || (DP[i + 2][0] && check(i, i + 2, 2))) {
        DP[i][0] = 1;
      }
    }
    if (i + 3 <= n) {
      if (DP[i + 3][0] || (DP[i + 3][1] && check(i, i + 3, 3))) {
        DP[i][1] = 1;
      }
    }
    if (DP[i][0]) {
      memset(cc, 0, sizeof(cc));
      cc[0] = S[i];
      cc[1] = S[i + 1];
      M[cc] = 1;
    }
    if (DP[i][1]) {
      memset(cc, 0, sizeof(cc));
      cc[0] = S[i];
      cc[1] = S[i + 1];
      cc[2] = S[i + 2];
      M[cc] = 1;
    }
  }
  cout << M.size() << endl;
  for (auto tmp : M) {
    cout << tmp.first << endl;
  }
  return 0;
}
