#include <bits/stdc++.h>
using namespace std;
class ReberlandLinguistics {
 private:
  string data_;
  int n_;
  set<string> suffixes_;
  set<pair<int, string> > visited_;
  void solve(int, string);

 public:
  ReberlandLinguistics();
};
ReberlandLinguistics::ReberlandLinguistics() {
  getline(cin, data_);
  solve(data_.length() - 1, "");
  suffixes_.erase("");
  cout << suffixes_.size() << endl;
  for (string s0 : suffixes_) cout << s0 << endl;
}
void ReberlandLinguistics::solve(int k, string nextSuffix) {
  if (k <= 3) return;
  pair<int, string> current = make_pair(k, nextSuffix);
  if (visited_.find(current) == visited_.end()) {
    visited_.insert(current);
    suffixes_.insert(nextSuffix);
    string s0 = data_.substr(k - 1, 2);
    if (nextSuffix.compare(s0)) solve(k - 2, s0);
    s0 = data_.substr(k - 2, 3);
    if (nextSuffix.compare(s0)) solve(k - 3, s0);
  }
}
int main() { ReberlandLinguistics solution; }
