#include <bits/stdc++.h>
using namespace std;
int memo[10010][2], n;
string s;
int dp(int pos, int tipo) {
  if (pos == n) return 1;
  if (pos > n) return 0;
  if (memo[pos][tipo] != -1) return memo[pos][tipo];
  int &ans = memo[pos][tipo] = 1;
  if (tipo == 0) {
    if (dp(pos + 2, 1)) return ans = 1;
    bool dif = 0;
    for (int i = 0; i < 2; i++) {
      if (s[pos + i] != s[pos + i + 2]) dif = 1;
    }
    if (dif == 1) {
      if (dp(pos + 2, 0))
        return ans = 1;
      else
        return ans = 0;
    } else
      return ans = 0;
  } else {
    if (dp(pos + 3, 0)) return ans = 1;
    bool dif = 0;
    for (int i = 0; i < 3; i++) {
      if (s[pos + i] != s[pos + i + 3]) dif = 1;
    }
    if (dif == 1) {
      if (dp(pos + 3, 1))
        return ans = 1;
      else
        return ans = 0;
    } else
      return ans = 0;
  }
}
int main() {
  cin >> s;
  n = (int)s.size();
  set<string> v;
  memset(memo, -1, sizeof(memo));
  for (int i = 5; i < n; i++) {
    if (dp(i, 0)) v.insert(s.substr(i, 2));
    if (dp(i, 1)) v.insert(s.substr(i, 3));
  }
  cout << (int)v.size() << endl;
  for (set<string>::iterator it = v.begin(); it != v.end(); it++)
    cout << (*it) << endl;
}
