#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const int N = 4e5 + 10;
const int INF = 1000000000;
const int inf = 1e9 + 1;
const double eps = 1e-9;
set<string> ans;
string s;
bool go[N][3];
bool equals(int pos, int la, int lb) {
  if (pos == 0) {
    return false;
  }
  if (la != lb) {
    return false;
  }
  pos -= la;
  for (int(i) = (0); (i) < (la); ++(i)) {
    if (s[pos + i] != s[pos + la + i]) {
      return false;
    }
  }
  return true;
}
int main() {
  ios::sync_with_stdio(false);
  cin >> s;
  int n = (int)s.size();
  if (n == 5) {
    cout << 0 << endl;
    return 0;
  }
  s = s.substr(5);
  n -= 5;
  reverse(s.begin(), s.end());
  go[0][0] = true;
  for (int(i) = (0); (i) < (n); ++(i)) {
    for (int(j) = (0); (j) < (2); ++(j)) {
      if (!go[i][j]) {
        continue;
      }
      for (int(len) = (2); (len) < (4); ++(len)) {
        if (i + len <= n) {
          if (!equals(i, j + 2, len)) {
            go[i + len][len - 2] = true;
            string nt = "";
            for (int(it) = (i + len - 1); (it) >= (i); --(it)) {
              nt += s[it];
            }
            ans.insert(nt);
          }
        }
      }
    }
  }
  cout << (int)ans.size() << endl;
  for (auto e : ans) {
    cout << e << endl;
  }
  return 0;
}
