#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "Possible" : "Impossible");
  exit(0);
}
void addmod(int &x, int y, int mod = 1000000007) {
  x += y;
  if (x >= mod) x -= mod;
}
void et() {
  puts("-1");
  exit(0);
}
set<string> ss;
string s;
bool vis[10055][5];
string getIj(int i, int j) {
  string tmp = "";
  for (int k = i; k <= j; k++) tmp += s[k];
  return tmp;
}
void dfs(int i, int len) {
  if (vis[i][len]) return;
  if (i <= 4) return;
  vis[i][len] = 1;
  string pre = "";
  if (len != 0) pre = getIj(i + 1, i + len);
  if (i - 1 > 4) {
    string two = getIj(i - 1, i);
    if (two != pre) {
      ss.insert(two);
      dfs(i - 2, 2);
    }
  }
  if (i - 2 > 4) {
    string three = getIj(i - 2, i);
    if (three != pre) {
      ss.insert(three);
      dfs(i - 3, 3);
    }
  }
}
void fmain() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> s;
  dfs(s.size() - 1, 0);
  cout << ss.size() << endl;
  for (auto p : ss) cout << p << endl;
}
int main() {
  fmain();
  return 0;
}
