#include <bits/stdc++.h>
using namespace std;
vector<string> v;
set<string> ha;
int dp2[10005], dp3[10005];
int main() {
  int k = 0, l;
  string str, pt, s;
  cin >> str;
  l = str.size() - 1;
  if (l < 6) {
    cout << 0;
    return 0;
  } else if (l == 6) {
    pt = str.substr(5, 2);
    cout << 1 << endl << pt;
    return 0;
  }
  dp2[l + 1] = 1;
  dp2[l] = 0;
  dp2[l - 1] = 1;
  dp2[l - 2] = 0;
  dp3[l + 1] = 1;
  dp3[l] = 0;
  dp3[l - 1] = 0;
  dp3[l - 2] = 1;
  for (int i = l - 3; i >= 5; --i) {
    pt = str.substr(i, 2);
    s = str.substr(i + 2, 2);
    if (s != pt && dp2[i + 2] == 1) dp2[i] = 1;
    if (dp3[i + 2] == 1) dp2[i] = 1;
    pt = str.substr(i, 3);
    if (l - (i + 2) < 2)
      dp3[i] = 0;
    else {
      if (dp2[i + 3] == 1) dp3[i] = 1;
      if (l - (i + 2) >= 3) {
        s = str.substr(i + 3, 3);
        if (s != pt && dp3[i + 3] == 1) dp3[i] = 1;
      }
    }
  }
  for (int i = 5; i <= l - 1; ++i) {
    pt = str.substr(i, 2);
    if (i == l - 1) {
      if (ha.find(pt) == ha.end()) {
        ha.insert(pt);
        v.push_back(pt);
        k++;
      }
    } else {
      if (dp2[i + 2] == 1) {
        s = str.substr(i + 2, 2);
        if (pt != s) {
          if (ha.find(pt) == ha.end()) {
            ha.insert(pt);
            v.push_back(pt);
            k++;
          }
        }
      }
      if (dp3[i + 2] == 1) {
        if (ha.find(pt) == ha.end()) {
          ha.insert(pt);
          v.push_back(pt);
          k++;
        }
      }
    }
    if (i >= l - 1) continue;
    pt = str.substr(i, 3);
    if (i == l - 2) {
      if (ha.find(pt) == ha.end()) {
        ha.insert(pt);
        v.push_back(pt);
        k++;
      }
    } else {
      if (dp3[i + 3] == 1) {
        s = str.substr(i + 3, 3);
        if (pt != s) {
          if (ha.find(pt) == ha.end()) {
            ha.insert(pt);
            v.push_back(pt);
            k++;
          }
        }
      }
      if (dp2[i + 3] == 1) {
        if (ha.find(pt) == ha.end()) {
          ha.insert(pt);
          v.push_back(pt);
          k++;
        }
      }
    }
  }
  sort(v.begin(), v.end());
  cout << k << endl;
  for (int i = 0; i < v.size(); ++i) {
    cout << v[i] << endl;
  }
  return 0;
}
