#include <bits/stdc++.h>
using namespace std;
const int maxn = 10100;
int n;
string s;
int f[maxn][5];
set<string> ret;
void dfs(int st, int len, string ori) {
  if (st - len + 1 < 5 || f[st][len]) return;
  f[st][len] = 1;
  string tmp = "";
  for (int i = st - len + 1; i <= st; i++) {
    tmp += s[i];
  }
  if (tmp == ori) {
    f[st][len] = 0;
    return;
  }
  ret.emplace(tmp);
  dfs(st - len, 2, tmp);
  dfs(st - len, 3, tmp);
}
signed main() {
  cin >> s;
  n = s.length();
  memset(f, 0, sizeof f);
  dfs(n - 1, 2, "");
  dfs(n - 1, 3, "");
  cout << ret.size() << endl;
  for (const auto x : ret) {
    cout << x << endl;
  }
  return 0;
}
