#include <bits/stdc++.h>
using namespace std;
string s;
bool dp[10100];
void read() { cin >> s; }
void solve() {
  if (s.length() < 7) {
    cout << 0 << endl;
    return;
  }
  set<string> ans;
  dp[s.length()] = true;
  for (int i = s.length() - 2; i >= 5; i--) {
    if (i == (s.length() - 2)) {
      dp[i] = true;
      ans.insert(s.substr(i, 2));
    } else if (i == (s.length() - 3)) {
      dp[i] = true;
      ans.insert(s.substr(i, 3));
    } else if (i == (s.length() - 4)) {
      if (s.substr(i, 2) != s.substr(i + 2, 2)) {
        dp[i] = true;
        ans.insert(s.substr(i, 2));
      }
    } else {
      if ((dp[i + 2] && s.substr(i, 2) != s.substr(i + 2, 2)) ||
          (dp[i + 2] && dp[i + 5])) {
        dp[i] = true;
        ans.insert(s.substr(i, 2));
      }
      if ((dp[i + 3] &&
           (i == (s.length() - 5) || s.substr(i, 3) != s.substr(i + 3, 3))) ||
          (dp[i + 3] && dp[i + 5])) {
        dp[i] = true;
        ans.insert(s.substr(i, 3));
      }
    }
  }
  cout << ans.size() << endl;
  for (set<string>::iterator it = ans.begin(); it != ans.end(); ++it) {
    cout << *it << endl;
  }
}
int main() {
  std::ios::sync_with_stdio(false);
  read();
  solve();
  return 0;
}
