#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 1000;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - 48;
    ch = getchar();
  }
  return x * f;
}
char str[maxn];
long long dp[maxn][4];
vector<string> v;
string get(long long l, long long r) {
  string s = "";
  for (long long i = l; i <= r; i++) s += str[i];
  return s;
}
int main(void) {
  cin.tie(0);
  std::ios::sync_with_stdio(false);
  cin >> (str + 1);
  long long len = strlen(str + 1);
  if (len <= 6) {
    cout << "0"
         << "\n";
  } else {
    long long ans = 0;
    if (len >= 7) {
      string s = get(len - 1, len);
      v.push_back(s);
      dp[len - 1][2] = 1;
    }
    if (len >= 8) {
      string s = get(len - 2, len);
      v.push_back(s);
      dp[len - 2][3] = 1;
    }
    if (len - 3 > 5) {
      for (long long i = len - 3; i <= len - 3; i++) {
        string s1 = get(i, i + 1);
        string s2 = get(i + 2, i + 3);
        if (s1 != s2) {
          v.push_back(s1);
          dp[i][2] = 1;
        }
      }
    }
    for (long long i = len - 4; i > 5; i--) {
      if (dp[i + 2][3]) {
        dp[i][2] = 1;
        string s1 = get(i, i + 1);
        v.push_back(s1);
      } else if (dp[i + 2][2]) {
        string s1 = get(i, i + 1);
        string s2 = get(i + 2, i + 3);
        if (s1 != s2) {
          v.push_back(s1);
          dp[i][2] = 1;
        }
      }
      if (dp[i + 3][2]) {
        string s1 = get(i, i + 2);
        v.push_back(s1);
        dp[i][3] = 1;
      } else if (dp[i + 3][3]) {
        string s1 = get(i, i + 2);
        string s2 = get(i + 3, i + 5);
        if (s1 != s2) {
          v.push_back(s1);
          dp[i][3] = 1;
        }
      }
    }
    sort(v.begin(), v.end());
    v.erase(unique(v.begin(), v.end()), v.end());
    cout << v.size() << "\n";
    for (auto i : v) {
      cout << i << "\n";
    }
  }
  return 0;
}
