#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int t, i, j;
  string s, t1;
  cin >> s;
  unordered_map<int, int> mp2, mp3;
  unordered_map<string, int> mp;
  vector<string> dude;
  for (j = s.size() - 2; j >= 5; j--) {
    string s1;
    s1.push_back(s[j]);
    s1.push_back(s[j + 1]);
    if (j + 2 <= s.size() - 2) {
      t1 = "";
      t1.push_back(s[j + 2]);
      t1.push_back(s[j + 3]);
    }
    if (j == s.size() - 2 || mp3[j + 2] || (mp2[j + 2] && s1 != t1)) {
      if (!mp[s1]) {
        dude.push_back(s1);
        mp[s1] = 1;
      }
      mp2[j] = 1;
    }
    if (j != s.size() - 2) {
      s1.push_back(s[j + 2]);
      if (j + 3 <= s.size() - 3) {
        t1 = "";
        t1.push_back(s[j + 3]);
        t1.push_back(s[j + 4]);
        t1.push_back(s[j + 5]);
      }
      if (j == s.size() - 3 || mp2[j + 3] || (mp3[j + 3] && s1 != t1)) {
        if (!mp[s1]) {
          dude.push_back(s1);
          mp[s1] = 1;
        }
        mp3[j] = 1;
      }
    }
  }
  cout << dude.size() << endl;
  sort(dude.begin(), dude.end());
  for (j = 0; j < dude.size(); j++) {
    cout << dude[j] << endl;
  }
  return 0;
}
