#include <bits/stdc++.h>
using namespace std;
char s[10005];
set<string> ans;
char DP[10005][4][4];
int n;
bool f(int i, int j, int l);
bool g(int i, int j, int l) {
  if (DP[i][j][l] != -1) return DP[i][j];
  if (i <= 4) return DP[i][j][l] = 0;
  int k = i + 3;
  char aux2[4] = {s[i], s[i + 1], s[i + 2], '\0'};
  if (k + 2 >= n) {
    f(i - 2, 2, 3);
    g(i - 3, 3, 3);
    ans.insert(aux2);
    return 1;
  }
  if (j == l && s[i] == s[k] && s[i + 1] == s[k + 1] && s[i + 2] == s[k + 2]) {
    DP[i][j][l] = 0;
    return DP[i][j][l];
  }
  DP[i][j][l] = 1;
  ans.insert(aux2);
  f(i - 2, 2, 3);
  g(i - 3, 3, 3);
  return 1;
}
bool f(int i, int j, int l) {
  if (DP[i][j][l] != -1) return DP[i][j][l];
  if (i <= 4) return DP[i][j][l] = 0;
  int k = i + 2;
  char aux1[3] = {s[i], s[i + 1], '\0'};
  if (k + 1 >= n) {
    f(i - 2, 2, 2);
    g(i - 3, 3, 2);
    ans.insert(aux1);
    return 1;
  }
  if (j == l && s[i] == s[k] && s[i + 1] == s[k + 1]) {
    DP[i][j][l] = 0;
    return DP[i][j][l];
  }
  DP[i][j][l] = 1;
  ans.insert(aux1);
  f(i - 2, 2, 2);
  g(i - 3, 3, 2);
  return 1;
}
int main() {
  int i;
  scanf("%s", s);
  n = strlen(s);
  memset(DP, -1, sizeof(DP));
  f(n - 2, 2, 0);
  g(n - 3, 3, 0);
  printf("%d\n", (int)ans.size());
  for (string x : ans) printf("%s\n", x.c_str());
  return 0;
}
