#include <bits/stdc++.h>
using namespace std;
long long power(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res % p;
}
struct compare {
  bool operator()(const std::string& first, const std::string& second) {
    return first.size() > second.size();
  }
};
set<string> ans;
string s;
int vis[10005][5];
void dfs(int len, int l) {
  if (vis[len][l] || len - l < 5) return;
  vis[len][l] = 1;
  string lop;
  lop = s.substr(len - l, l);
  ans.insert(lop);
  if (len - 2 * l >= 0) {
    string rr = s.substr(len - 2 * l, l);
    if (lop != rr) dfs(len - l, l);
  }
  dfs(len - l, 5 - l);
}
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> s;
  memset(vis, 0, sizeof(vis));
  dfs(s.length(), 2);
  dfs(s.length(), 3);
  cout << ans.size() << '\n';
  for (auto i : ans) cout << i << '\n';
  return 0;
};
