#include <bits/stdc++.h>
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  std::cout << name << " : " << arg1 << '\n';
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cout.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
using namespace std;
map<pair<long long, string>, long long> dp;
set<string> st;
string s;
void f(long long i, string pr) {
  if (dp.count(make_pair(i, pr))) return;
  if (i - 2 > 3) {
    string g = s.substr(i - 1, 2);
    if (g != pr) {
      st.insert(g), f(i - 2, g);
    }
  }
  if (i - 3 > 3) {
    string g = s.substr(i - 2, 3);
    if (g != pr) {
      st.insert(g), f(i - 3, g);
    }
  }
  dp[make_pair(i, pr)] = 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long i, j, n, m, k, cnt = 0, ans = 0, t = 1;
  cin >> s;
  n = s.length();
  f(n - 1, "");
  cout << st.size() << '\n';
  for (auto it : st) cout << it << '\n';
  return 0;
}
