#include <bits/stdc++.h>
using namespace std;
long long mod = 1e9 + 7, mod2 = 1e9 + 9;
set<string> my;
int a[100005][4];
int main() {
  string s;
  cin >> s;
  int sz = s.size();
  s += "$$$";
  a[sz][2] = a[sz][3] = 1;
  for (long long i = sz - 2; i >= (5); i--) {
    string s1(s, i, 2);
    string s2(s, i, 3);
    string s3(s, i + 2, 2);
    string s4(s, i + 3, 3);
    if (i < sz - 1 && ((a[i + 2][3] == 1) || (s1 != s3 && a[i + 2][2] == 1))) {
      a[i][2] = 1;
      my.insert(s1);
    }
    if (i < sz - 2 && ((a[i + 3][2] == 1) || (s2 != s4 && a[i + 3][3] == 1))) {
      a[i][3] = 1;
      my.insert(s2);
    }
  }
  cout << my.size() << endl;
  for (set<string>::iterator it = my.begin(); it != my.end(); it++) {
    cout << *it << endl;
  }
  return 0;
}
