#include <bits/stdc++.h>
#pragma comment(linker, "/stack:336777216")
#pragma GCC optimize("O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using ui = unsigned int;
template <typename T>
using less_priority_queue = priority_queue<T, vector<T>, greater<T>>;
ll const mod = 1e9 + 7;
auto mt = mt19937(chrono::steady_clock::now().time_since_epoch().count());
bool dp2[10005] = {};
bool dp3[10005] = {};
int main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  string s;
  cin >> s;
  int n = s.size();
  dp2[n] = 1;
  dp3[n] = 1;
  set<string> ans;
  for (int i = n - 2; i >= 5; i--) {
    if (dp3[i + 2] || (dp2[i + 2] && s.substr(i + 2, 2) != s.substr(i, 2))) {
      dp2[i] = 1;
      ans.insert(s.substr(i, 2));
    }
    if (dp2[i + 3] || (dp3[i + 3] && s.substr(i + 3, 3) != s.substr(i, 3))) {
      dp3[i] = 1;
      ans.insert(s.substr(i, 3));
    }
  }
  cout << ans.size() << '\n';
  for (auto& s : ans) cout << s << '\n';
  return 0;
}
