#include <bits/stdc++.h>
using namespace std;
string st;
int dp[10005][4];
int n;
set<string> st_set;
int rec(int pos, int len) {
  if (pos == 4 || pos == 5) {
    return 1;
  }
  if (pos < 4) return 0;
  int &ret = dp[pos][len];
  if (ret != -1) return ret;
  ret = 0;
  if (len == 0) {
    if (pos >= 7) {
      ret |= rec(pos - 3, 3);
      st_set.insert(st.substr(pos - 2, 3));
    }
    if (pos >= 6) {
      ret |= rec(pos - 2, 2);
      st_set.insert(st.substr(pos - 1, 2));
    }
  } else if (len == 2) {
    if (pos >= 6 && !(st[pos] == st[pos + 2] && st[pos + 1] == st[pos - 1])) {
      ret |= rec(pos - 2, 2);
      st_set.insert(st.substr(pos - 1, 2));
    }
    if (pos >= 7) {
      ret |= rec(pos - 3, 3);
      st_set.insert(st.substr(pos - 2, 3));
    }
  } else {
    if (pos >= 7 && !(st[pos] == st[pos + 3] && st[pos - 1] == st[pos + 2] &&
                      st[pos - 2] == st[pos + 1])) {
      ret |= rec(pos - 3, 3);
      st_set.insert(st.substr(pos - 2, 3));
    }
    if (pos >= 6) {
      ret |= rec(pos - 2, 2);
      st_set.insert(st.substr(pos - 1, 2));
    }
  }
  return ret;
}
int main() {
  cin >> st;
  n = st.length();
  memset(dp, -1, sizeof dp);
  rec(n - 1, 0);
  cout << st_set.size() << endl;
  for (string x : st_set) cout << x << endl;
  return 0;
}
