#include <bits/stdc++.h>
using namespace std;
const int N = 10005;
bool dp[N][2];
char s[N];
set<string> ans;
inline bool ck(int x, int y) {
  bool same = true;
  for (int i = 0; x + i < y; ++i) {
    same &= s[x + i] == s[y + i];
  }
  return !same;
}
int main() {
  scanf("%s", s);
  int n = strlen(s);
  dp[n][0] = dp[n][1] = true;
  for (int i = n - 2; i >= 5; --i) {
    dp[i][0] = dp[i + 2][1] || (dp[i + 2][0] && ck(i, i + 2));
    dp[i][1] = dp[i + 3][0] || (dp[i + 3][1] && ck(i, i + 3));
    if (dp[i][0]) ans.insert(string(s + i, s + i + 2));
    if (dp[i][1]) ans.insert(string(s + i, s + i + 3));
  }
  printf("%d\n", ans.size());
  for (auto &x : ans) {
    printf("%s\n", x.c_str());
  }
  return 0;
}
