#include <bits/stdc++.h>
using namespace std;
set<string> isthere;
map<pair<int, string>, int> m;
int ans;
string s;
void cnt(int idx, string last) {
  if (idx < 5) return;
  if (m.find(make_pair(idx, last)) != m.end()) return;
  m[make_pair(idx, last)] = 1;
  string len2 = "", len3 = "";
  len2 += s[idx - 1];
  len2 += s[idx];
  len3 += s[idx - 2];
  len3 += len2;
  if (idx - 3 >= 4 and len3 != last) {
    cnt(idx - 3, len3);
    isthere.insert(len3);
  }
  if (idx - 2 >= 4 and len2 != last) {
    cnt(idx - 2, len2);
    isthere.insert(len2);
  }
  return;
}
int main() {
  cin >> s;
  int sz = s.length();
  cnt(sz - 1, "");
  cout << isthere.size() << "\n";
  auto it = isthere.begin();
  for (; it != isthere.end(); it++) {
    cout << *it << "\n";
  }
}
