#include <bits/stdc++.h>
using namespace std;
set<string> st;
string a;
bool dp[100000][5] = {0};
void func(int ind, int l) {
  string s1 = "", s2 = "";
  string l1 = "", l2 = "";
  if (dp[ind][l] == 1) {
    return;
  }
  if (ind >= 6) {
    s1 = s1 + a[ind - 1] + a[ind];
    if (l == 2) {
      l1 = l1 + a[ind + 1] + a[ind + 2];
    } else {
      l1 = l1 + " ";
    }
    if (l1.compare(s1) != 0) {
      st.insert(s1);
      func(ind - 2, 2);
    }
  }
  if (ind >= 7) {
    s2 = s2 + a[ind - 2] + a[ind - 1] + a[ind];
    if (l == 3) {
      l2 = l2 + a[ind + 1] + a[ind + 2] + a[ind + 3];
    } else {
      l2 = l2 + " ";
    }
    if (l2.compare(s2) != 0) {
      st.insert(s2);
      func(ind - 3, 3);
    }
  }
  dp[ind][l] = 1;
}
int main() {
  cin >> a;
  int le = a.size() - 1;
  func(le, 0);
  set<string>::iterator it;
  cout << st.size() << "\n";
  for (it = st.begin(); it != st.end(); it++) {
    cout << *it << "\n";
  }
}
