#include <bits/stdc++.h>
using namespace std;
const int N = 10005;
string a;
map<string, int> check;
bool dp[N];
int cnt = 0;
string ans[N << 1];
int main() {
  ios::sync_with_stdio(false);
  cin >> a;
  check.clear();
  memset(dp, 0, sizeof(dp));
  int len = a.size();
  dp[len] = 1;
  for (int i = len - 1; i >= 5; --i) {
    string tmp, tmp1;
    if (dp[i + 2]) {
      tmp = a.substr(i, 2);
      if (!dp[i + 5]) {
        tmp1 = a.substr(i + 2, 2);
        if (tmp != tmp1) {
          if (!check[tmp]) check[tmp] = 1, ans[++cnt] = tmp;
          dp[i] = 1;
        }
      } else {
        if (!check[tmp]) check[tmp] = 1, ans[++cnt] = tmp;
        dp[i] = 1;
      }
    }
    if (dp[i + 3]) {
      tmp = a.substr(i, 3);
      if (!dp[i + 5]) {
        tmp1 = a.substr(i + 3, 3);
        if (tmp != tmp1) {
          if (!check[tmp]) check[tmp] = 1, ans[++cnt] = tmp;
          dp[i] = 1;
        }
      } else {
        if (!check[tmp]) check[tmp] = 1, ans[++cnt] = tmp;
        dp[i] = 1;
      }
    }
  }
  sort(ans + 1, ans + cnt + 1);
  cout << cnt << endl;
  for (int i = 1; i <= cnt; ++i) {
    cout << ans[i] << endl;
  }
  return 0;
}
