#include <bits/stdc++.h>
long long int ciel(double a) {
  long long int ret = a;
  if (a - ret > 0.0000000001) ret++;
  return ret;
}
long long int gcd(long long int a, long long int b) {
  if (a < b) return gcd(b, a);
  if (a % b == 0) return b;
  return gcd(b, a % b);
}
double fgcd(double a, double b) {
  if (fabs(a) < fabs(b)) return fgcd(b, a);
  if (fabs(b) < 0.0001) return a;
  return fgcd(b, fmod(a, b));
}
bool db_db_cmp(double a, double b) {
  return (a + 0.0000000001 > b && a - 0.0000000001 < b);
}
long long int fact[100005];
void generate_factorials() {
  fact[0] = fact[1] = 1;
  for (int i = 2; i <= 100005 - 1; i++)
    fact[i] = ((fact[i - 1] * i) % 1000000007);
}
long long int pow(long long int n, long long int p) {
  if (p == 0) return 1;
  if (n <= 1) return n;
  long long int res = 1;
  while (p) {
    if (p & 1) res = res * n;
    n = n * n;
    p /= 2;
  }
  return res;
}
long long int mod_pow(long long int n, long long int p) {
  if (p == 0) return 1;
  if (n <= 1) return n;
  long long int res = 1;
  while (p) {
    if (p & 1) res = ((res * n) % 1000000007);
    n = ((n * n) % 1000000007);
    p /= 2;
  }
  return res;
}
long long int get_inverse(long long int n) {
  return mod_pow(n, 1000000007 - 2);
}
long long int get_nCr(long long int n, long long int r) {
  return ((fact[n] * get_inverse(((fact[r] * fact[n - r]) % 1000000007))) %
          1000000007);
}
using namespace std;
void preprocess() {}
void init() {}
set<string> second;
string st;
int dp[10005][4];
void solve(int test_case) {
  init();
  cin >> st;
  dp[st.length()][2] = dp[st.length()][3] = 1;
  for (int i = (int)st.size() - 1; i >= 5; i--) {
    if (i + 2 <= st.length()) {
      if (dp[i + 2][3] == 1 ||
          (dp[i + 2][2] == 1 &&
           !(i + 2 < st.length() && st[i] == st[i + 2] && i + 3 < st.length() &&
             st[i + 1] == st[i + 3]))) {
        dp[i][2] = 1;
        second.insert(st.substr(i, 2));
      }
    }
    if (i + 3 <= st.length()) {
      if (dp[i + 3][2] == 1 ||
          (dp[i + 3][3] == 1 &&
           !(i + 3 < st.length() && st[i] == st[i + 3] && i + 4 < st.length() &&
             st[i + 1] == st[i + 4] && i + 5 < st.length() &&
             st[i + 2] == st[i + 5]))) {
        dp[i][3] = 1;
        second.insert(st.substr(i, 3));
      }
    }
  }
  cout << second.size() << endl;
  for (auto it = second.begin(); it != second.end(); it++) {
    cout << *it << endl;
  }
}
int main() {
  preprocess();
  int t = 1;
  for (int i = 1; i <= t; i++) {
    solve(i);
  }
  return 0;
}
