#include <bits/stdc++.h>
using namespace std;
long long POW(long long A, long long N, long long MOD) {
  if (N == 0) return 1 % MOD;
  if (N == 1) return A % MOD;
  long long tmp = POW(A, N / 2, MOD) % MOD;
  if (N % 2)
    return ((tmp * tmp) % MOD * A % MOD) % MOD;
  else
    return (tmp * tmp) % MOD;
}
long long MUL(long long A, long long B, long long MOD) {
  long long r = 0;
  while (B) {
    r = (r + (A * (B % 2) % MOD)) % MOD;
    A = (A + A) % MOD;
    B /= 2;
  }
  return r;
}
long long GCD(long long A, long long B) { return B == 0 ? A : GCD(B, A % B); }
int dx[] = {0, -1, 0, 1, 0};
int dy[] = {0, 0, 1, 0, -1};
template <class X, class Y>
bool minimize(X &x, const Y &y) {
  X eps = 1e-9;
  if (x > y + eps) {
    x = y;
    return true;
  } else
    return false;
}
template <class X, class Y>
bool maximize(X &x, const Y &y) {
  X eps = 1e-9;
  if (x + eps < y) {
    x = y;
    return true;
  } else
    return false;
}
template <class T>
T Abs(const T &x) {
  return (x < 0 ? -x : x);
}
const int MAXN = 1e4 + 105;
string S;
int N;
int dp[MAXN][4];
set<string> H;
int solve(int i, int pre) {
  if (i == N + 1) return 1;
  if (dp[i][pre] != -1) return dp[i][pre];
  int cur = 0;
  if (pre == 2) {
    if (i + 3 - 1 <= N) cur = max(cur, solve(i + 3, 3));
    if (i + 2 - 1 <= N) {
      if (S[i] != S[i - 2] || S[i + 1] != S[i - 1])
        cur = max(cur, solve(i + 2, 2));
    }
  } else {
    if (i + 2 - 1 <= N) cur = max(cur, solve(i + 2, 2));
    if (i + 3 - 1 <= N) {
      if (S[i] != S[i - 3] || S[i + 1] != S[i - 2] || S[i + 2] != S[i - 1])
        cur = max(cur, solve(i + 3, 3));
    }
  }
  return dp[i][pre] = cur;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> S;
  S = " " + S;
  N = S.size() - 1;
  memset(dp, -1, sizeof(dp));
  for (int i = (6), _b = (N); i <= _b; ++i) {
    if (i + 2 - 1 <= N && solve(i + 2, 2)) {
      string X = "";
      X = X + S[i] + S[i + 1];
      H.insert(X);
    }
    if (i + 3 - 1 <= N && solve(i + 3, 3)) {
      string X = "";
      X = X + S[i] + S[i + 1] + S[i + 2];
      H.insert(X);
    }
  }
  cout << H.size() << '\n';
  for (auto &ans : H) cout << ans << '\n';
  return 0;
}
