#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 10;
char x[N];
bool dp[N][5];
string answer[2 * N];
char tmp[5];
bool isSame(int a, int b, int c) {
  bool s = true;
  for (int i = 0; i < c; i++) {
    if (x[a + i] != x[b + i]) s = false;
  }
  return s;
}
int main() {
  scanf("%s", x);
  int k = strlen(x);
  int a = 0;
  dp[k][2] = 1;
  dp[k][3] = 1;
  if (k >= 7) {
    for (int r = 0; r < 2; r++) tmp[r] = x[k - 2 + r];
    tmp[2] = '\0';
    answer[a] = string(tmp);
    a++;
  }
  if (k >= 8) {
    for (int r = 0; r < 3; r++) tmp[r] = x[k - 3 + r];
    tmp[3] = '\0';
    answer[a] = string(tmp);
    a++;
  }
  dp[k - 1][2] = 0;
  dp[k - 1][3] = 0;
  for (int i = k - 2; i >= 7; i--) {
    for (int j = 2; j <= 3; j++) {
      int base = i - j;
      int _j = 5 - j;
      if (base <= 4) continue;
      dp[i][j] = 0;
      if (i + j <= k) {
        bool res = isSame(i - j, i, j);
        if (!res && dp[i + j][j]) dp[i][j] = 1;
      }
      if (i + _j <= k && dp[i + _j][_j]) dp[i][j] = 1;
      if (dp[i][j]) {
        for (int r = 0; r < j; r++) tmp[r] = x[i - j + r];
        tmp[j] = '\0';
        answer[a] = string(tmp);
        a++;
      }
    }
  }
  sort(answer, answer + a);
  int z = unique(answer, answer + a) - answer;
  cout << z << endl;
  for (int i = 0; i < z; i++) cout << answer[i] << endl;
}
