#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long INF = 2e18;
const int N = 11234;
int n, m;
set<string> st;
char s[N];
int dp[N][4];
void dfs(int pos, string pre, int len) {
  if (pos - 1 < 5) return;
  if (dp[pos][len]) return;
  dp[pos][len] = 1;
  string str = "";
  for (int i = 1; i >= 0; --i) str += s[pos - i];
  if (str != pre) {
    st.insert(str);
    dfs(pos - 2, str, 2);
  }
  if (pos - 2 >= 5) {
    str = "";
    for (int i = 2; i >= 0; --i) str += s[pos - i];
    if (str != pre) {
      st.insert(str);
      dfs(pos - 3, str, 3);
    }
  }
}
int main() {
  while (scanf("%s", s) != EOF) {
    int i, j;
    memset(dp, 0, sizeof(dp));
    st.clear();
    n = strlen(s);
    if (n < 5)
      puts("0");
    else {
      dfs(n - 1, "", 0);
      printf("%d\n", st.size());
      set<string>::iterator it = st.begin();
      for (; it != st.end(); ++it) {
        cout << *it << endl;
      }
    }
  }
}
