#include <bits/stdc++.h>
using namespace std;
string s;
bool f[10001][2];
int n;
set<string> suff;
int main() {
  cin >> s;
  n = s.length();
  if (n < 7) {
    cout << 0;
    return 0;
  }
  f[n - 2][0] = true;
  if (n > 7) f[n - 3][1] = true;
  for (int i = n - 4; i >= 5; i--) {
    if (f[i + 2][1]) f[i][0] = true;
    if (f[i + 3][0]) f[i][1] = true;
    if (f[i + 2][0] && s.substr(i, 2) != s.substr(i + 2, 2)) f[i][0] = true;
    if (f[i + 3][1] && s.substr(i, 3) != s.substr(i + 3, 3)) f[i][1] = true;
  }
  for (int i = n - 1; i >= 0; i--) {
    if (f[i][0]) suff.insert(s.substr(i, 2));
    if (f[i][1]) suff.insert(s.substr(i, 3));
  }
  cout << suff.size() << endl;
  std::set<string>::iterator it;
  for (it = suff.begin(); it != suff.end(); it++) cout << *it << endl;
}
