#include <bits/stdc++.h>
using namespace std;
inline long long Rd() {
  long long x = 0;
  int ch = getchar(), f = 1;
  while (!isdigit(ch) && (ch != '-') && (ch != EOF)) ch = getchar();
  if (ch == '-') {
    f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = (x << 1) + (x << 3) + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void Rt(long long x) {
  if (x < 0) putchar('-'), x = -x;
  if (x >= 10)
    Rt(x / 10), putchar(x % 10 + '0');
  else
    putchar(x + '0');
}
char s[10005];
map<string, int> Ans;
char ans[4];
bool F[10005][4];
int main() {
  for (int i = 1; i <= (int)5; i++) getchar();
  scanf("%s", s + 1);
  int n = strlen(s + 1);
  if (n >= 2) F[n - 1][2] = 1;
  if (n >= 3) F[n - 2][3] = 1;
  for (int i = n - 3; i >= (int)1; i--) {
    F[i][2] |= F[i + 2][3];
    if (s[i] != s[i + 2] || s[i + 1] != s[i + 3]) F[i][2] |= F[i + 2][2];
    F[i][3] |= F[i + 3][2];
    if (s[i] != s[i + 3] || s[i + 1] != s[i + 4] || s[i + 2] != s[i + 5])
      F[i][3] |= F[i + 3][3];
  }
  for (int i = 1; i <= (int)n; i++) {
    if (F[i][2]) {
      ans[0] = s[i], ans[1] = s[i + 1], ans[2] = 0;
      Ans[string(ans)] = 1;
    }
    if (F[i][3]) {
      ans[0] = s[i], ans[1] = s[i + 1], ans[2] = s[i + 2], ans[3] = 0;
      Ans[string(ans)] = 1;
    }
  }
  Rt(Ans.size()), putchar('\n');
  for (map<string, int>::iterator i = Ans.begin(); i != Ans.end(); i++)
    puts(i->first.c_str());
}
