#include <bits/stdc++.h>
using namespace std;
bool two[(int)1e5] = {0};
bool three[(int)1e5] = {0};
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s1;
  cin >> s1;
  two[s1.size()] = three[s1.size()] = 1;
  set<string> ans;
  for (int(i) = (s1.size() - 2); (i) >= (5); --(i)) {
    string t = string(1, s1[i]) + string(1, s1[i + 1]);
    if ((three[i + 2]) ||
        (two[i + 2] && t != (string(1, s1[i + 2]) + string(1, s1[i + 3])))) {
      ans.insert(t);
      two[i] = 1;
    }
    string t2 = string(1, s1[i]) + string(1, s1[i + 1]) + string(1, s1[i + 2]);
    if ((two[i + 3]) ||
        (three[i + 3] && t2 != (string(1, s1[i + 3]) + string(1, s1[i + 4]) +
                                string(1, s1[i + 5])))) {
      ans.insert(t2);
      three[i] = 1;
    }
  }
  cout << ans.size() << "\n";
  for (string p : ans) cout << p << "\n";
  return 0;
}
