#include <bits/stdc++.h>
using namespace std;
template <typename T>
void read(T &x) {
  x = 0;
  char ch = getchar();
  int fh = 1;
  while (ch < '0' || ch > '9') {
    if (ch == '-') fh = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') x = x * 10 + ch - '0', ch = getchar();
  x *= fh;
}
template <typename T>
void write(T x) {
  if (x < 0) x = -x, putchar('-');
  if (x > 9) write(x / 10);
  putchar(x % 10 + '0');
}
template <typename T>
void writeln(T x) {
  write(x);
  puts("");
}
string s;
set<string> st;
bool mem[10005][4];
signed main() {
  cin >> s;
  queue<pair<int, int>> q;
  q.push(make_pair(s.size(), 0));
  while (!q.empty()) {
    pair<int, int> p = q.front();
    q.pop();
    if (mem[p.first][p.second]) continue;
    mem[p.first][p.second] = 1;
    if (p.first - 5 >= 2) {
      string pre = s.substr(p.first, p.second);
      string suf = s.substr(p.first - 2, 2);
      if (suf != pre) {
        st.insert(suf);
        q.push(make_pair(p.first - 2, 2));
      }
    }
    if (p.first - 5 >= 3) {
      string pre = s.substr(p.first, p.second);
      string suf = s.substr(p.first - 3, 3);
      if (suf != pre) {
        st.insert(suf);
        q.push(make_pair(p.first - 3, 3));
      }
    }
  }
  writeln(st.size());
  for (register set<string>::iterator it = st.begin(); it != st.end(); ++it)
    cout << *it << endl;
  return 0;
}
