#include <bits/stdc++.h>
using namespace std;
vector<int> v[3010];
set<string> q;
int main() {
  cin.sync_with_stdio(false);
  cin.tie(0);
  string s;
  cin >> s;
  bool d2[11000];
  bool d3[11000];
  for (int i = 0; i < s.length() + 10; i++) {
    d2[i] = false;
    d3[i] = false;
  }
  if (s.length() >= 7) {
    d2[s.length() - 2] = true;
    string s1 = "";
    s1 += s[s.length() - 2];
    s1 += s[s.length() - 1];
    q.insert(s1);
  }
  if (s.length() >= 8) {
    d3[s.length() - 3] = true;
    string s1 = "";
    s1 += s[s.length() - 3];
    s1 += s[s.length() - 2];
    s1 += s[s.length() - 1];
    q.insert(s1);
  }
  for (int i = s.length(); i >= 5; i--) {
    if ((d2[i + 2] && (s[i] != s[i + 2] || s[i + 1] != s[i + 3])) ||
        (d3[i + 2])) {
      d2[i] = true;
      string s1 = "";
      s1 += s[i];
      s1 += s[i + 1];
      q.insert(s1);
    }
    if ((d3[i + 3] &&
         (s[i] != s[i + 3] || s[i + 1] != s[i + 4] || s[i + 2] != s[i + 5])) ||
        (d2[i + 3])) {
      d3[i] = true;
      string s1 = "";
      s1 += s[i];
      s1 += s[i + 1];
      s1 += s[i + 2];
      q.insert(s1);
    }
  }
  cout << q.size() << "\n";
  for (set<string>::iterator it = q.begin(); it != q.end(); it++)
    cout << *it << "\n";
  return 0;
}
