#include <bits/stdc++.h>
using namespace std;
set<string> setzera;
string s;
int len;
map<pair<int, string>, int> dp;
void solve(int pos, string last) {
  pair<int, string> state(pos, last);
  if (pos - 1 <= 4) return;
  if (dp.count(state)) return;
  dp[state] = 1;
  string s2 = s.substr(pos - 1, 2);
  if (s2 != last) {
    setzera.insert(s2);
    solve(pos - 2, s2);
  }
  if (pos - 2 <= 4) return;
  string s3 = s.substr(pos - 2, 3);
  if (s3 != last) {
    setzera.insert(s3);
    solve(pos - 3, s3);
  }
}
int main() {
  cin >> s;
  len = s.size();
  solve(len - 1, "-1");
  cout << setzera.size() << endl;
  for (string aux : setzera) cout << aux << endl;
  return 0;
}
