#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const double pi = acos(-1.0);
char line[20000];
int done[20000][3], L;
set<string> second;
inline bool can(int i, int l) {
  if (i + l == L) return 1;
  if (L - i - l == 1) return 0;
  if (l == 3 && L - i - 1 == 2) return 1;
  bool c = 1;
  for (int j = 0; j < (l); j++) c &= line[i + j] == line[i + j + l];
  return !c;
}
int solve(int i, int last = 2) {
  if (i == L) return 2;
  if (i > L) return 1;
  if (done[i][last]) return done[i][last];
  done[i][last] = 1;
  if (solve(i + 2, 0) == 2) {
    bool c = last != 0;
    if (last == 0 && can(i - 2, 2)) c = 1;
    if (c) {
      string s = "xx";
      s[0] = line[i];
      s[1] = line[i + 1];
      second.insert(s);
      done[i][last] = 2;
    }
  }
  if (solve(i + 3, 1) == 2) {
    bool c = last != 1;
    if (last == 1 && can(i - 3, 3)) c = 1;
    if (c) {
      string s = "xxx";
      s[0] = line[i];
      s[1] = line[i + 1];
      s[2] = line[i + 2];
      second.insert(s);
      done[i][last] = 2;
    }
  }
  return done[i][last];
}
int main() {
  scanf("%s", line);
  L = strlen(line);
  for (int i = 0; i < (L); i++) {
    if (i > 4) solve(i);
  }
  printf("%lu\n", second.size());
  for (auto s : second) printf("%s\n", s.c_str());
  return 0;
}
