#include <bits/stdc++.h>
using namespace std;
int visited[100000];
set<string> mset;
void rec(string s, string last) {
  if (visited[s.length()] == 2) return;
  if (s.length() > 2) {
    if (last.compare(s.substr(s.length() - 3))) {
      mset.insert(s.substr(s.length() - 3));
      rec(s.substr(0, s.length() - 3), s.substr(s.length() - 3));
      visited[s.length()]++;
    }
  }
  if (last.compare(s.substr(s.length() - 2))) {
    mset.insert(s.substr(s.length() - 2));
    rec(s.substr(0, s.length() - 2), s.substr(s.length() - 2));
    visited[s.length()]++;
  }
}
int main() {
  visited[0] = visited[1] = 2;
  visited[2] = 1;
  string s;
  char c;
  for (int i = 0; i < 5; i++) c = getchar();
  c = getchar();
  while (c != '\n') {
    s += c;
    c = getchar();
  }
  rec(s, "");
  cout << mset.size() << "\n";
  for (auto i = mset.begin(); i != mset.end(); i++) {
    cout << *i << "\n";
  }
}
