#include <bits/stdc++.h>
using namespace std;
const int maxn = 10023;
int v[maxn][2], a[maxn << 1];
int i, j, k, n, m;
bool f[maxn][2];
char s[maxn];
int main() {
  scanf("%s", s + 1);
  n = strlen(s + 1);
  if (n <= 6) {
    puts("0");
    return 0;
  }
  for (i = 1; i <= n; i++) s[i] -= 'a' - 1;
  v[n - 1][0] = s[n - 1] * 27 * 27 + s[n] * 27;
  for (i = n - 2; i > 5; i--)
    v[i][0] = s[i] * 27 * 27 + s[i + 1] * 27, v[i][1] = v[i][0] + s[i + 2];
  f[n + 1][0] = f[n + 1][1] = 1;
  f[n - 1][0] = 1;
  a[m = 1] = v[n - 1][0];
  for (i = n - 2; i > 5; i--) {
    f[i][0] = f[i + 2][1] || (f[i + 2][0] && v[i][0] != v[i + 2][0]);
    f[i][1] = f[i + 3][0] || (f[i + 3][1] && v[i][1] != v[i + 3][1]);
    if (f[i][0]) a[++m] = v[i][0];
    if (f[i][1]) a[++m] = v[i][1];
  }
  sort(a + 1, a + 1 + m);
  int cnt = 0;
  for (i = 1; i <= m; i++)
    if (a[i] != a[i - 1]) a[++cnt] = a[i];
  printf("%d\n", cnt);
  for (i = 1; i <= cnt; i++) {
    putchar('a' - 1 + a[i] / 27 / 27);
    putchar('a' - 1 + a[i] / 27 % 27);
    if (a[i] % 27) putchar('a' - 1 + a[i] % 27);
    puts("");
  }
  return 0;
}
