#include <bits/stdc++.h>
using namespace std;
string s;
map<string, int> has;
vector<string> ans, res;
bool yes[101010][3];
void solve() {
  memset(yes, 0, sizeof(yes));
  cin >> s;
  int len = s.size();
  yes[len][2] = yes[len][3] = 1;
  if (len <= 6) return;
  for (int i = len; i > 6; i--) {
    if (yes[i][3]) {
      ans.push_back(s.substr(i - 2, 2));
      yes[i - 2][2] = 1;
      if (i - 3 < 5)
        ;
      else if (i + 3 > len) {
        ans.push_back(s.substr(i - 3, 3));
        yes[i - 3][3] = 1;
      } else {
        if (s.substr(i - 3, 3) == s.substr(i, 3))
          ;
        else {
          ans.push_back(s.substr(i - 3, 3));
          yes[i - 3][3] = 1;
        }
      }
    }
    if (yes[i][2]) {
      if (i + 2 > len) {
        ans.push_back(s.substr(i - 2, 2));
        yes[i - 2][2] = 1;
      } else {
        if (s.substr(i - 2, 2) == s.substr(i, 2))
          ;
        else {
          ans.push_back(s.substr(i - 2, 2));
          yes[i - 2][2] = 1;
        }
      }
      if (i - 3 >= 5) {
        ans.push_back(s.substr(i - 3, 3));
        yes[i - 3][3] = 1;
      }
    }
  }
  for (int i = 0; i < ans.size(); i++) {
    if (has[ans[i]] == 0) {
      res.push_back(ans[i]);
      has[ans[i]]++;
    }
  }
}
int main() {
  solve();
  cout << res.size() << endl;
  sort(res.begin(), res.end());
  for (int i = 0; i < res.size(); i++) {
    cout << res[i] << endl;
  }
  return 0;
}
