#include <bits/stdc++.h>
using namespace std;
const long long OO = 1e12;
const double EPS = (1e-7);
int dcmp(double x, double y) { return fabs(x - y) <= EPS ? 0 : x < y ? -1 : 1; }
string root;
set<string> myset;
vector<string> generate(string s, int l) {
  vector<string> g(2);
  for (int i = 0; i < (int)(s.size() - l); ++i) g[0] += s[i];
  for (int i = s.size() - l; i < s.size(); i++) g[1] += s[i];
  return g;
}
int mem[10004][3];
void best(int size, int k) {
  if (mem[size][k] != -1) return;
  mem[size][k] = 1;
  if (size - 2 > 4)
    if (k == 0 || root.substr(size, k) != root.substr(size - 2, 2)) {
      myset.insert(root.substr(size - 2, 2));
      best(size - 2, 2);
    }
  if (size - 3 > 4)
    if (k == 0 || root.substr(size, k) != root.substr(size - 3, 3)) {
      myset.insert(root.substr(size - 3, 3));
      best(size - 3, 3);
    }
}
int main() {
  memset(mem, -1, sizeof(mem));
  cin >> root;
  best(root.size(), 0);
  cout << myset.size() << endl;
  for (auto a : myset) cout << a << "\n";
}
