#include <bits/stdc++.h>
using namespace std;
bool vis[10004][4];
string s;
vector<string> v;
void dfs(int ii, int ff) {
  if (ii + 1 >= (int)s.size()) return;
  if (vis[ii][ff]) return;
  vis[ii][ff] = 1;
  string x = "";
  if (ff != 2) {
    if (ii + 3 >= (int)s.size()) {
      x += s[ii + 1];
      x += s[ii];
      v.push_back(x);
    } else {
      if (s[ii] == s[ii + 2] && s[ii + 1] == s[ii + 3]) {
        x += s[ii + 1];
        x += s[ii];
        v.push_back(x);
        dfs(ii + 2, 2);
      } else {
        x += s[ii + 1];
        x += s[ii];
        v.push_back(x);
        dfs(ii + 2, 0);
      }
    }
  }
  if (ii + 2 < (int)s.size() && ff != 3) {
    x.clear();
    if (ii + 5 >= (int)s.size()) {
      x += s[ii + 2];
      x += s[ii + 1];
      x += s[ii];
      v.push_back(x);
      dfs(ii + 3, 3);
    } else {
      if (s[ii] == s[ii + 3] && s[ii + 1] == s[ii + 4] &&
          s[ii + 2] == s[ii + 5]) {
        x += s[ii + 2];
        x += s[ii + 1];
        x += s[ii];
        v.push_back(x);
        dfs(ii + 3, 3);
      } else {
        x += s[ii + 2];
        x += s[ii + 1];
        x += s[ii];
        v.push_back(x);
        dfs(ii + 3, 0);
      }
    }
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(nullptr);
  cin >> s;
  reverse(s.begin(), s.end());
  s.pop_back();
  s.pop_back();
  s.pop_back();
  s.pop_back();
  s.pop_back();
  dfs(0, 0);
  sort(v.begin(), v.end());
  v.resize(unique(v.begin(), v.end()) - v.begin());
  cout << v.size() << "\n";
  for (int i = 0; i < (int)v.size(); i++) {
    cout << v[i] << "\n";
  }
  return 0;
}
