#include <bits/stdc++.h>
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx")
using namespace std;
int a, b, c, d, n, m, k;
char str[10002];
bool cool[10002][2];
inline bool good(int p1, int p2, int len) {
  for (int _n((len)-1), i(0); i <= _n; i++) {
    if (str[p1 + i] != str[p2 + i]) return 1;
  }
  return 0;
}
int main() {
  vector<string> ans;
  scanf("%s", str);
  n = (int)strlen(str);
  memset((cool), 0, sizeof(cool));
  cool[n][0] = cool[n][1] = 1;
  for (int i = (n - 1), _b = (0); i >= _b; i--) {
    if (i + 2 - 1 < n) {
      if (cool[i + 2][1]) {
        cool[i][0] = 1;
      } else if (cool[i + 2][0]) {
        if (i + 2 == n || good(i, i + 2, 2)) {
          cool[i][0] = 1;
        }
      }
    }
    if (i + 3 - 1 < n) {
      if (cool[i + 3][0]) {
        cool[i][1] = 1;
      } else if (cool[i + 3][1]) {
        if (i + 3 == n || good(i, i + 3, 3)) {
          cool[i][1] = 1;
        }
      }
    }
  }
  for (int _n((n)-1), i(0); i <= _n; i++) {
    if (i < 5) continue;
    if (cool[i][0]) {
      string s = "";
      s += str[i];
      s += str[i + 1];
      ans.push_back(s);
    }
    if (cool[i][1]) {
      string s = "";
      s += str[i];
      s += str[i + 1];
      s += str[i + 2];
      ans.push_back(s);
    }
  }
  sort((ans).begin(), (ans).end());
  ans.resize(unique((ans).begin(), (ans).end()) - ans.begin());
  printf("%d\n", (int)((ans).size()));
  for (int _n(((int)((ans).size())) - 1), i(0); i <= _n; i++) {
    printf("%s\n", ans[i].c_str());
  }
}
