#include <bits/stdc++.h>
using namespace std;
unordered_set<string> t;
set<pair<int, int>> made;
void sub(int start, const string &s, const string &old) {
  if (made.find(make_pair(start, old.size())) != made.end()) return;
  made.insert(make_pair(start, old.size()));
  string x;
  for (int i = start; i < (int)s.size() && i < start + 3; ++i) {
    x.push_back(s[i]);
    if (i > start && x.compare(old)) {
      t.insert(x);
      sub(i + 1, s, x);
    }
  }
}
int main(int argc, const char **argv) {
  string s;
  cin >> s;
  string ss;
  for (int i = s.size() - 1; i >= 5; --i) ss.push_back(s[i]);
  sub(0, ss, "");
  set<string> tt;
  for (const string &s : t) {
    string ss;
    for (int i = s.size() - 1; i >= 0; --i) ss.push_back(s[i]);
    tt.insert(ss);
  }
  cout << tt.size() << endl;
  for (const string &s : tt) cout << s << endl;
}
