#include <bits/stdc++.h>
using namespace std;
string d;
set<string> s;
void solve(int i, string k);
set<pair<int, string> > check;
int main() {
  cin >> d;
  solve(d.length() - 1, "");
  if (s.size() == 0)
    cout << s.size() << endl;
  else
    cout << s.size() - 1 << endl;
  for (set<string>::iterator it = s.begin(); it != s.end(); it++) {
    if (*it != "") cout << *it << endl;
  }
}
void solve(int i, string k) {
  if (i <= 4) {
    s.insert(k);
    return;
  }
  if (check.find(pair<int, string>(i, k)) != check.end()) return;
  check.insert(pair<int, string>(i, k));
  string x(d.begin() + i - 1, d.begin() + i + 1);
  string y(d.begin() + i - 2, d.begin() + i + 1);
  if (i - 1 <= 4) x = "";
  if (i - 2 <= 4) y = "";
  if (x.compare(k) != 0) s.insert(k), solve(i - 2, x);
  if (y.compare(k) != 0) s.insert(k), solve(i - 3, y);
}
