#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 10;
set<string> ans;
string s;
bool vis[4][N];
void DFS(int x, string pre) {
  if (vis[pre.size()][x]) return;
  vis[pre.size()][x] = 1;
  if (x - 1 > 4) {
    string tmp = s.substr(x - 1, 2);
    if (tmp != pre) {
      ans.insert(tmp);
      DFS(x - 2, tmp);
    }
  }
  if (x - 2 > 4) {
    string tmp = s.substr(x - 2, 3);
    if (tmp != pre) {
      ans.insert(tmp);
      DFS(x - 3, tmp);
    }
  }
}
int main() {
  ios::sync_with_stdio(false);
  cin >> s;
  int len = s.size();
  if (len <= 6) {
    cout << 0 << endl;
    return 0;
  }
  DFS(len - 1, "");
  cout << ans.size() << endl;
  for (auto u : ans) {
    cout << u << endl;
  }
  return 0;
}
