#include <bits/stdc++.h>
using namespace std;
unsigned long long gcd(unsigned long long a, unsigned long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
string s;
set<string> ss;
map<pair<string, int>, int> dp;
long long recur(int idx, string tmp) {
  if (idx >= 4 && tmp.length() != 0) {
    ss.insert(tmp);
  }
  if (idx <= 4) {
    return 0;
  }
  if (dp[make_pair(tmp, idx)] != 0) {
    return dp[make_pair(tmp, idx)];
  }
  long long ans = 0;
  string t1 = "";
  t1 = t1 + s[idx - 1] + s[idx];
  string t2 = "";
  t2 = t2 + s[idx - 2] + s[idx - 1] + s[idx];
  if (tmp != t1 && idx - 2 >= 4) {
    ans = 1 + recur(idx - 2, t1);
  }
  if (tmp != t2 && idx - 3 >= 4) {
    ans += 1 + recur(idx - 3, t2);
  }
  return dp[make_pair(tmp, idx)] = ans;
}
int main() {
  cin >> s;
  int ans = recur(s.length() - 1, "");
  cout << ss.size() << endl;
  for (set<string>::iterator it = ss.begin(); it != ss.end(); it++) {
    cout << *it << endl;
  }
}
