#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long int prod(long long int a, long long int b) {
  long long int x, d;
  if (b == 0)
    return 1;
  else {
    d = prod(a, b / 2);
    x = (d * d) % 1000000007;
    if (b % 2 == 0)
      return x;
    else
      return (x * (a % 1000000007)) % 1000000007;
  }
}
string s;
int dp[100005][2];
set<string> st, ans;
set<string>::iterator it;
void foo(int l, int state) {
  if (dp[l][state]) return;
  if (l == 5 || l == 6) return;
  string t1, t2;
  if (state == 0) {
    t1.push_back(s[l - 2]);
    t1.push_back(s[l - 1]);
    ans.insert(t1);
    foo(l - 2, 1);
    if (l >= 9 && (s[l - 4] != s[l - 2] || s[l - 3] != s[l - 1])) {
      foo(l - 2, 0);
    }
  } else if (l >= 8) {
    t2.push_back(s[l - 3]);
    t2.push_back(s[l - 2]);
    t2.push_back(s[l - 1]);
    ans.insert(t2);
    foo(l - 3, 0);
    if (l >= 11 && (s[l - 6] != s[l - 3] || s[l - 4] != s[l - 1] ||
                    s[l - 5] != s[l - 2])) {
      foo(l - 3, 1);
    }
  }
  dp[l][state] = 1;
  return;
}
int main() {
  cin >> s;
  int l = (int)s.size();
  foo(l, 0);
  foo(l, 1);
  printf("%d\n", (int)ans.size());
  for (it = ans.begin(); it != ans.end(); it++) cout << *it << endl;
  return 0;
}
