#include <bits/stdc++.h>
using namespace std;
map<string, int> sav[10005];
set<string> a;
string s;
void dfs(int l, string lst) {
  if (sav[l][lst]) return;
  sav[l][lst] = 1;
  if (l <= 4) return;
  bool ok = 0;
  string tmp = "";
  for (int i = 0; i < 3; i++) {
    if (l - i < 0) break;
    tmp = tmp + s[l - i];
    string bak = tmp;
    reverse(bak.begin(), bak.end());
    if (i > 0 && l - i - 1 >= 4 && bak != lst)
      dfs(l - i - 1, bak), a.insert(bak);
  }
}
int main() {
  cin >> s;
  dfs(s.length() - 1, "");
  cout << a.size() << endl;
  for (auto p : a) cout << p << "\n";
}
