#include <bits/stdc++.h>
using namespace std;
template <class T, class U>
inline void Max(T &a, U b) {
  if (a < b) a = b;
}
template <class T, class U>
inline void Min(T &a, U b) {
  if (a > b) a = b;
}
inline void add(int &a, int b) {
  a += b;
  while (a >= 1000000007) a -= 1000000007;
}
int pow(int a, int b) {
  int ans = 1;
  while (b) {
    if (b & 1) ans = ans * (long long)a % 1000000007;
    a = (long long)a * a % 1000000007;
    b >>= 1;
  }
  return ans;
}
char s[10010];
bool dp[10010][4];
int n;
bool can(int i, int j) {
  if (i >= n) return 1;
  return dp[i][j];
}
bool check(int i, int first, int j, int second) {
  if (first != second) return 1;
  if (j + second > n) return 0;
  for (int k = 0; k < first; k++)
    if (s[i + k] != s[j + k]) return 1;
  return 0;
}
int main() {
  int i, j, k, m, T;
  scanf("%s", s);
  n = strlen(s);
  memset(dp, 0, sizeof(dp));
  set<string> g;
  for (int i = n - 1 - 1; i >= 5; i--) {
    for (int j = 2; j < 4; j++) {
      if (i + j > n) break;
      string t = "";
      for (int k = i; k < i + j; k++) t += s[k];
      for (int k = 2; k < 4; k++) {
        if (can(i + j, k) && check(i, j, i + j, k)) {
          dp[i][j] = 1;
          g.insert(t);
          break;
        }
      }
    }
  }
  printf("%d\n", (int)g.size());
  for (__typeof(g.begin()) it = g.begin(); it != g.end(); it++) {
    cout << *it << "\n";
  }
  return 0;
}
