#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0;
  char ch = getchar();
  bool positive = 1;
  for (; ch < '0' || ch > '9'; ch = getchar())
    if (ch == '-') positive = 0;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return positive ? x : -x;
}
inline char RC() {
  char c = getchar();
  while (c == ' ' || c == '\n') c = getchar();
  return c;
}
inline long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
inline long long lcm(long long a, long long b, long long MOD) {
  return a / gcd(a, b) * b % MOD;
}
inline long long Sub(long long x, long long y, long long mod) {
  long long res = x - y;
  while (res < 0) res += mod;
  return res;
}
inline long long Add(long long x, long long y, long long mod) {
  long long res = x + y;
  while (res >= mod) res -= mod;
  return res;
}
inline long long POW_MOD(long long x, long long y, long long mod) {
  long long ret = 1;
  while (y > 0) {
    if (y & 1) ret = ret * x % mod;
    x = x * x % mod;
    y >>= 1;
  }
  return ret;
}
const int N = 20015;
const int inf = 2100000000;
const long long INF = 1LL << 62;
const double PI = 3.14159265358;
bool dp[N][2];
char s[N], s2[N];
set<string> ans;
int main() {
  scanf("%s", s);
  int n = strlen(s);
  for (int i = n - 1; i >= 5; --i) {
    s2[n - i] = s[i];
  }
  dp[0][0] = dp[0][1] = true;
  dp[2][0] = dp[3][1] = true;
  for (int i = 4; i <= n - 5; ++i) {
    dp[i][0] = dp[i - 2][1] ||
               (dp[i - 2][0] && (s2[i] != s2[i - 2] || s2[i - 1] != s2[i - 3]));
    dp[i][1] = dp[i - 3][0] ||
               (dp[i - 3][1] &&
                (i >= 6 && (s2[i] != s2[i - 3] || s2[i - 1] != s2[i - 4] ||
                            s2[i - 2] != s2[i - 5])));
  }
  for (int i = 2; i <= n - 5; ++i) {
    if (dp[i][0]) {
      string temp;
      temp += s2[i], temp += s2[i - 1];
      ans.insert(temp);
    }
    if (dp[i][1]) {
      string temp;
      temp += s2[i], temp += s2[i - 1], temp += s2[i - 2];
      ans.insert(temp);
    }
  }
  cout << ans.size() << endl;
  for (auto str : ans) {
    cout << str << endl;
  }
  return 0;
}
