#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e4 + 7;
string s;
set<string> ans;
bool dp[maxn][5];
int main() {
  memset(dp, 0, sizeof dp);
  while (cin >> s) {
    ans.clear();
    int len = s.size();
    dp[len][2] = dp[len][3] = true;
    for (int i = len - 2; i > 4; i--) {
      if (dp[i + 2][2] && s.substr(i, 2) != s.substr(i + 2, 2) || dp[i + 2][3])
        ans.insert(s.substr(i, 2)), dp[i][2] = true;
      if (dp[i + 3][3] && s.substr(i, 3) != s.substr(i + 3, 3) || dp[i + 3][2])
        ans.insert(s.substr(i, 3)), dp[i][3] = true;
    }
    cout << ans.size() << endl;
    for (auto it : ans) cout << it << endl;
  }
  return 0;
}
