#include <bits/stdc++.h>
using namespace std;
string s;
bool dp[10005][2];
set<string> st;
int main() {
  while (cin >> s) {
    memset(dp, 0, sizeof(dp));
    int len = s.size();
    st.clear();
    dp[len][0] = true;
    dp[len][1] = true;
    for (int i = len - 1; i >= 5; i--) {
      if (!(s[i] == s[i + 2] && s[i + 1] == s[i + 3]) && dp[i + 2][0] ||
          dp[i + 2][1]) {
        dp[i][0] = true;
        string c;
        c += s[i];
        c += s[i + 1];
        st.insert(c);
      }
      if ((dp[i + 3][1] && !(s[i] == s[i + 3] && s[i + 1] == s[i + 4] &&
                             s[i + 2] == s[i + 5])) ||
          dp[i + 3][0]) {
        dp[i][1] = true;
        string c;
        c += s[i];
        c += s[i + 1];
        c += s[i + 2];
        st.insert(c);
      }
    }
    printf("%d\n", st.size());
    for (set<string>::iterator it = st.begin(); it != st.end(); it++) {
      cout << *it << endl;
    }
  }
  return 0;
}
