#include <bits/stdc++.h>
using namespace std;
const int maxn = 10005;
int main() {
  string s;
  cin >> s;
  set<string> a;
  set<string> v[maxn];
  int n = s.size();
  for (int i = n - 1; i > 4; --i) {
    string t = s.substr(i, 1);
    for (int j = i - 1; j >= i - 2 && j > 4; --j) {
      t = s[j] + t;
      if (v[i + 1].size() == 1 && !v[i + 1].count(t) || v[i + 1].size() > 1 ||
          i + 1 >= n) {
        v[j].insert(t);
        a.insert(t);
      }
    }
  }
  cout << a.size() << endl;
  for (auto x : a) {
    cout << x << endl;
  }
  return 0;
}
