#include <bits/stdc++.h>
using namespace std;
string s, t;
int dp[10010][2];
set<string> p;
set<string>::iterator it;
int main() {
  ios::sync_with_stdio(false);
  cin >> s;
  int len = s.size();
  if (len > 2) dp[len - 2][0] = 1;
  if (len > 3) dp[len - 3][1] = 1;
  for (int i = len - 4; i >= 5; i--) {
    dp[i][0] |= dp[i + 2][1];
    if (s[i] != s[i + 2] || s[i + 1] != s[i + 3]) dp[i][0] |= dp[i + 2][0];
    dp[i][1] |= dp[i + 3][0];
    if (i + 5 >= len || s[i] != s[i + 3] || s[i + 1] != s[i + 4] ||
        s[i + 2] != s[i + 5])
      dp[i][1] |= dp[i + 3][1];
  }
  for (int i = 5; i <= len - 1; i++) {
    t.clear();
    if (dp[i][0]) {
      t += s[i], t += s[i + 1];
      p.insert(t);
      t.clear();
    }
    if (dp[i][1]) {
      t += s[i], t += s[i + 1], t += s[i + 2];
      p.insert(t);
    }
  }
  cout << p.size() << endl;
  if (p.size()) {
    it = p.begin();
    do {
      cout << (*it) << endl;
      ++it;
    } while (it != p.end());
  }
  return 0;
}
