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