#include <bits/stdc++.h>
inline long long read() {
  long long x = 0;
  char c = getchar(), f = 1;
  for (; c < '0' || '9' < c; c = getchar())
    if (c == '-') f = -1;
  for (; '0' <= c && c <= '9'; c = getchar()) x = x * 10 + c - '0';
  return x * f;
}
inline void write(long long x) {
  static char buf[20];
  int len = 0;
  if (x < 0) putchar('-'), x = -x;
  for (; x; x /= 10) buf[len++] = x % 10 + '0';
  if (!len)
    putchar('0');
  else
    while (len) putchar(buf[--len]);
}
inline void writesp(long long x) {
  write(x);
  putchar(' ');
}
inline void writeln(long long x) {
  write(x);
  putchar('\n');
}
char s[200010];
std::map<int, int> mp;
int f[200010][2];
int n;
int main() {
  scanf("%s", s);
  n = strlen(s);
  int cnt = 0;
  f[n][0] = f[n][1] = 1;
  for (int i = n - 1; i >= 5; i--) {
    f[i][0] = f[i + 2][1];
    f[i][1] = f[i + 3][0];
    if (s[i] != s[i + 2] || s[i + 1] != s[i + 3]) f[i][0] |= f[i + 2][0];
    if (s[i] != s[i + 3] || s[i + 1] != s[i + 4] || s[i + 2] != s[i + 5])
      f[i][1] |= f[i + 3][1];
    int k0 = (s[i] << 16) + (s[i + 1] << 8),
        k1 = (s[i] << 16) + (s[i + 1] << 8) + s[i + 2];
    if (f[i][0]) mp[k0] = 1;
    if (f[i][1]) mp[k1] = 1;
  }
  writeln(mp.size());
  for (auto t : mp) {
    int k = t.first;
    if (k % 256 == 0)
      printf("%c%c\n", k >> 16, (k >> 8) & 255);
    else
      printf("%c%c%c\n", k >> 16, (k >> 8) & 255, k & 255);
  }
  return 0;
}
