#include <bits/stdc++.h>
using namespace std;
int n, d[100010][4];
string s;
set<string>::iterator it;
set<string> ss;
int main() {
  int t, C = 1;
  while (cin >> s) {
    n = s.size();
    d[n][2] = d[n][3] = 1;
    for (int i = n - 1; i >= 5; i--) {
      for (int j = 2; j <= 3; j++) {
        if (d[i][j] = d[i + j][j] && s.substr(i, j) != s.substr(i + j, j) ||
                      d[i + j][j ^ 1])
          ss.insert(s.substr(i, j));
      }
    }
    printf("%d\n", ss.size());
    for (it = ss.begin(); it != ss.end(); it++) cout << *it << endl;
  }
  return 0;
}
