#include <bits/stdc++.h>
using namespace std;
int n, m, dp[10005][2] = {0};
char s[10005];
struct cc {
  friend bool operator<(cc a, cc b) { return strcmp(a.c, b.c) < 0; }
  char c[5];
} a[100005];
int main() {
  int i, j, m = 0;
  scanf("%s", s);
  n = strlen(s);
  if (n > 6) {
    dp[n - 2][0] = 1;
    memset(a[m].c, 0, sizeof(a[m].c));
    a[m].c[0] = s[n - 2], a[m].c[1] = s[n - 1];
    m++;
  }
  if (n > 7) {
    dp[n - 3][1] = 1;
    memset(a[m].c, 0, sizeof(a[m].c));
    a[m].c[0] = s[n - 3], a[m].c[1] = s[n - 2], a[m].c[2] = s[n - 1];
    m++;
  }
  for (i = n - 4; i > 4; i--) {
    if (dp[i + 2][1] == 1 ||
        dp[i + 2][0] == 1 && (!(s[i] == s[i + 2] && s[i + 1] == s[i + 3]))) {
      dp[i][0] = 1;
      memset(a[m].c, 0, sizeof(a[m].c));
      a[m].c[0] = s[i], a[m].c[1] = s[i + 1];
      m++;
    }
    if (dp[i + 3][0] == 1 ||
        dp[i + 3][1] == 1 && (!(s[i] == s[i + 3] && s[i + 1] == s[i + 4] &&
                                s[i + 2] == s[i + 5]))) {
      dp[i][1] = 1;
      memset(a[m].c, 0, sizeof(a[m].c));
      a[m].c[0] = s[i], a[m].c[1] = s[i + 1], a[m].c[2] = s[i + 2];
      m++;
    }
  }
  sort(a, a + m);
  for (i = j = 1; i < m; i++) {
    if (strcmp(a[i].c, a[j - 1].c) == 0) continue;
    a[j++] = a[i];
  }
  m = min(m, j);
  printf("%d\n", m);
  for (i = 0; i < m; i++) printf("%s\n", a[i].c);
  return 0;
}
