#include <bits/stdc++.h>
const int MAXN = 1e5 + 5;
std::string str;
int n;
int f[MAXN][2];
int main() {
  std::ios::sync_with_stdio(false);
  std::cin >> str;
  int n = str.length();
  if (n <= 5) {
    puts("0");
    return 0;
  }
  f[n + 1][0] = f[n + 1][1] = 1;
  for (int i = n; i >= 6; --i) {
    for (int j = 0; j <= 1; ++j) {
      if (j == 0) {
        f[i][j] |= (f[i + 2][0] & (!(str[i - 1] == str[i + 2 - 1] &&
                                     str[i + 1 - 1] == str[i + 3 - 1]))) |
                   (f[i + 2][1]);
      } else {
        f[i][j] |= (f[i + 3][0]) |
                   (f[i + 3][1] & (!(str[i - 1] == str[i + 3 - 1] &&
                                     str[i + 1 - 1] == str[i + 4 - 1] &&
                                     str[i + 2 - 1] == str[i + 5 - 1])));
      }
    }
  }
  std::set<std::string> S;
  for (int i = 6; i <= n; ++i) {
    if (f[i][0]) S.insert(str.substr(i - 1, 2));
    if (f[i][1]) S.insert(str.substr(i - 1, 3));
  }
  std::cout << S.size() << '\n';
  for (auto x : S) std::cout << x << '\n';
  return 0;
}
