#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
int main() {
  string s;
  cin >> s;
  int index = s.size() - 1;
  vector<char> din3(s.size(), 0);
  vector<char> din2(s.size(), 0);
  if (index - 2 >= 5) din3[index - 2] = 1;
  if (index - 1 >= 5) din2[index - 1] = 1;
  index -= 3;
  set<string> res;
  while (index >= 5) {
    if (din2[index + 2] == 1 and s.substr(index, 2) != s.substr(index + 2, 2)) {
      din2[index] = 1;
    }
    if (din3[index + 3] == 1 and s.substr(index, 3) != s.substr(index + 3, 3)) {
      din3[index] = 1;
    }
    if (din2[index + 3] == 1) {
      din3[index] = 1;
    }
    if (din3[index + 2] == 1) {
      din2[index] = 1;
    }
    --index;
  }
  for (auto i(0); i < din2.size(); ++i) {
    if (din2[i] == 1) {
      res.insert(s.substr(i, 2));
    }
  }
  for (auto i(0); i < din3.size(); ++i) {
    if (din3[i] == 1) {
      res.insert(s.substr(i, 3));
    }
  }
  cout << res.size() << endl;
  while (!res.empty()) {
    cout << *res.begin() << endl;
    res.erase(res.begin());
  }
  return 0;
}
