#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e4 + 100;
template <class T>
inline void read(T &s) {
  s = 0;
  T w = 1, ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    s = (s << 1) + (s << 3) + (ch ^ 48);
    ch = getchar();
  }
  s *= w;
}
string s;
int size;
int f[maxn];
map<string, int> m;
struct answer {
  string str;
} a[maxn];
inline bool cmp(answer A, answer B) { return A.str < B.str; }
inline string get(int x, int y) {
  string b;
  for (int i = 1; i <= y; ++i) {
    b += s[x + i - 1];
  }
  return b;
}
int main() {
  getline(cin, s);
  int len = s.size();
  f[len] = 1;
  f[len + 1] = 0;
  f[len - 1] = 0;
  for (int i = len - 2; i >= 5; --i) {
    if (f[i + 2] != 0) {
      string b = get(i, 2);
      if (f[i + 2] != 2 || b != get(i + 2, 2)) {
        if (!m.count(b)) {
          m[b] = 1;
          a[++size].str = b;
        }
        f[i] += 2;
      }
    }
    if (f[i + 3] != 0) {
      string b = get(i, 3);
      if (f[i + 3] != 3 || b != get(i + 3, 3)) {
        if (!m.count(b)) {
          m[b] = 1;
          a[++size].str = b;
        }
        f[i] += 3;
      }
    }
  }
  sort(a + 1, a + size + 1, cmp);
  printf("%d\n", size);
  for (int i = 1; i <= size; ++i) cout << a[i].str << endl;
  return 0;
}
