#include <bits/stdc++.h>
using namespace std;
const double Pi = 3.14159265358979323846264338;
const double eps = 1e-6;
char s[200005], v[40000][5], aux[5], auxx[5];
bool can[40000][2];
int w[200005];
inline bool cmp(int a, int b) { return strcmp(v[a], v[b]) < 0; }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> s + 1;
  int n = strlen(s + 1);
  int cnt = 0;
  if (n >= 7) {
    ++cnt;
    can[n - 1][0] = true;
    v[cnt][0] = s[n - 1], v[cnt][1] = s[n], v[cnt][2] = 0;
  }
  if (n >= 8) {
    ++cnt;
    can[n - 2][1] = true;
    v[cnt][0] = s[n - 2], v[cnt][1] = s[n - 1], v[cnt][2] = s[n], v[cnt][3] = 0;
  }
  for (int i = n - 3; i >= 6; --i) {
    aux[0] = s[i], aux[1] = s[i + 1], aux[2] = 0;
    auxx[0] = s[i + 2], auxx[1] = s[i + 3], auxx[2] = 0;
    bool ok = false;
    if (can[i + 2][1] || (strcmp(aux, auxx) != 0 && can[i + 2][0])) {
      can[i][0] = true;
      ++cnt;
      strcpy(v[cnt], aux);
    }
    aux[0] = s[i], aux[1] = s[i + 1], aux[2] = s[i + 2], aux[3] = 0;
    auxx[0] = s[i + 3], auxx[1] = s[i + 4], auxx[2] = s[i + 5], auxx[3] = 0;
    ok = false;
    if (can[i + 3][0] || (strcmp(aux, auxx) != 0 && can[i + 3][1])) {
      can[i][1] = true;
      ++cnt;
      strcpy(v[cnt], aux);
    }
  }
  for (int i = 1; i <= cnt; ++i) w[i] = i;
  sort(w + 1, w + cnt + 1, cmp);
  if (cnt == 0) {
    cout << 0;
    return 0;
  }
  int sol = 1;
  for (int i = 2; i <= cnt; ++i) {
    if (strcmp(v[w[i]], v[w[i - 1]]) != 0) ++sol;
  }
  cout << sol << '\n';
  cout << v[w[1]] << '\n';
  for (int i = 2; i <= cnt; ++i) {
    if (strcmp(v[w[i]], v[w[i - 1]]) != 0) cout << v[w[i]] << '\n';
  }
  return 0;
}
