#include <bits/stdc++.h>
using namespace std;
vector<string> _split(const string& s, char c) {
  vector<string> v;
  stringstream ss(s);
  string x;
  while (getline(ss, x, c)) v.emplace_back(x);
  return v;
}
void _print(vector<string>::iterator) {}
template <typename T, typename... Args>
void _print(vector<string>::iterator it, T a, Args... args) {
  string name = it->substr((*it)[0] == ' ', it->length());
  if (isalpha(name[0]))
    cerr << name << " = " << a << " ";
  else
    cerr << name << " ";
  _print(++it, args...);
}
const int N = (int)1e5;
const int K = 5;
string str;
int n;
bool used[N][K];
set<string> s;
void gen(int pos, int last_len) {
  if (pos == 4) return;
  if (used[pos][last_len]) return;
  used[pos][last_len] = true;
  string last = str.substr(pos + 1, last_len);
  for (int new_len = 2; new_len <= 3; new_len++) {
    string cur = str.substr(pos - new_len + 1, new_len);
    if (cur == last) continue;
    int new_pos = pos - new_len;
    if (new_pos < 4) continue;
    s.insert(cur);
    gen(new_pos, new_len);
  }
}
int main() {
  cin >> str;
  n = (int)str.length();
  gen(n - 1, 0);
  printf("%d\n", (int)s.size());
  for (string ss : s) printf("%s\n", ss.c_str());
  return 0;
}
