#include <bits/stdc++.h>
using namespace std;
string s;
map<pair<int, string>, int> DP;
set<string> ans;
int len;
void dfs(int idx, string prev) {
  if (DP[make_pair(idx, prev)]) return;
  DP[make_pair(idx, prev)] = 1;
  if (idx <= 4) return;
  if (idx - 2 > 4) {
    string cur = "";
    cur = cur + s[idx - 2];
    cur = cur + s[idx - 1];
    if (cur != prev) {
      ans.insert(cur);
      dfs(idx - 2, cur);
    }
  }
  if (idx - 3 > 4) {
    string cur = "";
    cur = cur + s[idx - 3];
    cur = cur + s[idx - 2];
    cur = cur + s[idx - 1];
    if (cur != prev) {
      ans.insert(cur);
      dfs(idx - 3, cur);
    }
  }
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> s;
  len = s.length();
  if (len <= 6) {
    cout << 0 << endl;
    return 0;
  }
  dfs(len, "");
  cout << ans.size() << endl;
  for (auto k : ans) cout << k << endl;
}
