#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
vector<string> ans;
string s;
int vis[N][4];
void dfs(int en, int l, string pre) {
  if (vis[en][l] || en < 7) return;
  vis[en][l] = 1;
  string t = "";
  t += s[en - 2], t += s[en - 1];
  if (t != pre) {
    ans.push_back(t);
    dfs(en - 2, 2, t);
  }
  if (en >= 8) {
    t = "", t += s[en - 3], t += s[en - 2], t += s[en - 1];
    if (t != pre) {
      ans.push_back(t);
      dfs(en - 3, 3, t);
    }
  }
}
int main() {
  cin >> s;
  memset(vis, 0, sizeof(vis));
  dfs(s.length(), 0, "");
  if (ans.empty()) {
    cout << "0" << endl;
    return 0;
  }
  sort(ans.begin(), ans.end());
  int cnt = 1;
  for (int i = 1; i < ans.size(); i++)
    if (ans[i] != ans[i - 1]) cnt++;
  printf("%d\n", cnt);
  cout << ans[0] << endl;
  for (int i = 1; i < ans.size(); i++)
    if (ans[i] != ans[i - 1]) cout << ans[i] << endl;
  return 0;
}
