#include <bits/stdc++.h>
using namespace std;
const int N = (int)1e4 + 5;
set<string> ans;
string s;
int can[2][N];
int main() {
  cin >> s;
  if (s.size() >= 7) {
    ans.insert(s.substr(s.size() - 2));
    can[0][(int)s.size() - 2] = 1;
  }
  if (s.size() >= 8) {
    ans.insert(s.substr(s.size() - 3));
    can[1][(int)s.size() - 3] = 1;
  }
  for (int i = s.size() - 4; i >= 5; i--) {
    string cur = "";
    cur += s[i];
    cur += s[i + 1];
    string nxt = "";
    nxt += s[i + 2];
    nxt += s[i + 3];
    if (can[1][i + 2] == 1 || (can[0][i + 2] == 1 && cur != nxt)) {
      can[0][i] = 1;
      ans.insert(cur);
    }
    nxt = "";
    if (s.size() - i >= 6) {
      nxt += s[i + 3];
      nxt += s[i + 4];
      nxt += s[i + 5];
    }
    cur += s[i + 2];
    if (can[0][i + 3] == 1 || (can[1][i + 3] == 1 && cur != nxt)) {
      can[1][i] = 1;
      ans.insert(cur);
    }
  }
  printf("%d\n", (int)ans.size());
  for (auto i : ans) {
    puts(i.c_str());
  }
  return 0;
}
