#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int mex = 5001;
int main() {
  int n;
  string s;
  cin >> s;
  n = s.size();
  map<string, int> mp[n + 1];
  mp[n]["1"] = 1;
  mp[n]["15"] = 1;
  for (int i = n - 2; i >= 0; i--) {
    string s1;
    s1.push_back(s[i]);
    s1.push_back(s[i + 1]);
    for (auto it = mp[i + 2].begin(); it != mp[i + 2].end(); it++)
      if (it->first != s1 && i > 4) mp[i][s1]++;
    if ((i + 2) < n) {
      s1.push_back(s[i + 2]);
      for (auto it = mp[i + 3].begin(); it != mp[i + 3].end(); it++)
        if (it->first != s1 && i > 4) mp[i][s1]++;
    }
  }
  map<string, int> mp2;
  for (int i = 0; i < n; i++) {
    for (auto it = mp[i].begin(); it != mp[i].end(); it++) mp2[it->first]++;
  }
  cout << mp2.size() << endl;
  for (auto it = mp2.begin(); it != mp2.end(); it++) cout << it->first << endl;
}
