#include <bits/stdc++.h>
using namespace std;
int dp[4][10005];
char S[10005];
map<string, int> mp;
int main() {
  gets(S);
  int len = strlen(S);
  dp[2][len - 2] = 1;
  string s = "";
  if (len >= 7) mp[s + S[len - 2] + S[len - 1]] = 1;
  s = "";
  dp[3][len - 3] = 1;
  if (len >= 8) mp[s + S[len - 3] + S[len - 2] + S[len - 1]] = 1;
  for (int i = len - 4; i >= 5; i--) {
    char cur, next;
    cur = S[i];
    next = S[i + 1];
    if (i + 4 - 1 < len) {
      char cur_2, next_2;
      cur_2 = S[i + 2];
      next_2 = S[i + 3];
      if (cur_2 != cur || next_2 != next) {
        dp[2][i] += dp[2][i + 2];
      }
    }
    if (i + 5 - 1 < len) {
      dp[2][i] += dp[3][i + 2];
    }
    if (dp[2][i] != 0) {
      string s = "";
      mp[s + cur + next] = 1;
    }
    char nexter = S[i + 2];
    if (i + 5 - 1 < len) {
      dp[3][i] += dp[2][i + 3];
    }
    if (i + 6 - 1 < len) {
      char cur_2, next_2, nexter_2;
      cur_2 = S[i + 3];
      next_2 = S[i + 4];
      nexter_2 = S[i + 5];
      if (cur_2 != cur || next_2 != next || nexter_2 != nexter) {
        dp[3][i] += dp[3][i + 3];
      }
    }
    if (dp[3][i] != 0) {
      string s = "";
      mp[s + cur + next + nexter] = 1;
    }
  }
  map<string, int>::iterator it;
  printf("%d\n", mp.size());
  for (it = mp.begin(); it != mp.end(); it++) cout << it->first << endl;
  return 0;
}
