#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
set<string> ans;
string s;
int n;
const int N = 1e4;
int dp[N][4];
void go(int pos, int num) {
  if (dp[pos][num]) return;
  dp[pos][num] = 1;
  string last = "";
  if (num) last = s.substr(pos + 1, num);
  if (pos - 1 >= 5 && s.substr(pos - 1, 2) != last) {
    ans.insert(s.substr(pos - 1, 2));
    go(pos - 2, 2);
  }
  if (pos - 2 >= 5 && s.substr(pos - 2, 3) != last) {
    ans.insert(s.substr(pos - 2, 3));
    go(pos - 3, 3);
  }
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  memset(dp, 0, sizeof(dp));
  cin >> s;
  n = (int)(s.size());
  if (n <= 5) {
    cout << 0;
    return 0;
  }
  go(n - 1, 0);
  cout << (int)(ans.size()) << "\n";
  for (auto x : ans) cout << x << "\n";
}
