#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using vi = vector<ll>;
using vvi = vector<vi>;
using vb = vector<bool>;
using ii = pair<ll, ll>;
constexpr bool LOG = true;
void Log() {
  if (LOG) cerr << "\n";
}
template <class T, class... S>
void Log(T t, S... s) {
  if (LOG) cerr << t << "\t", Log(s...);
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  string s;
  cin >> s;
  if (s.size() <= 5) {
    cout << 0 << endl;
    return 0;
  }
  s = s.substr(5);
  ll n = s.size();
  vector<bool> pos(n + 1, false);
  vector<vector<string>> strings(n + 1);
  pos[n] = true;
  strings[n].push_back("");
  for (ll i = n - 1; i >= 0; --i) {
    if (i + 2 <= n && pos[i + 2]) {
      if (strings[i + 2].size() > 1 || strings[i + 2][0] != s.substr(i, 2)) {
        pos[i] = true;
        strings[i].push_back(s.substr(i, 2));
      }
    }
    if (i + 3 <= n && pos[i + 3]) {
      if (strings[i + 3].size() > 1 || strings[i + 3][0] != s.substr(i, 3)) {
        pos[i] = true;
        strings[i].push_back(s.substr(i, 3));
      }
    }
  }
  set<string> ans;
  for (auto &v : strings)
    for (auto &s : v) ans.insert(s);
  cout << ans.size() - 1 << endl;
  for (auto &s : ans)
    if (s.size() > 0) cout << s << '\n';
  return 0;
}
