#include <bits/stdc++.h>
using namespace std;
const int MAXX = 1e4 + 10;
int n;
string s;
vector<string> v, ans;
bool dp[MAXX][4];
void Fill_dp() {
  dp[n - 1][2] = 0, dp[n - 1][3] = 0;
  dp[n - 2][2] = 1, dp[n - 2][3] = 0;
  dp[n - 3][3] = 1, dp[n - 3][2] = 0;
  if (n - 2 >= 5) v.push_back(s.substr(n - 2, 2));
  if (n - 3 >= 5) v.push_back(s.substr(n - 3, 3));
  for (int i = n - 4; i >= 5; i--) {
    dp[i][2] = ((dp[i + 2][2] == 1 && (s.substr(i, 2) != s.substr(i + 2, 2))) ||
                (dp[i + 2][3] == 1));
    dp[i][3] = ((dp[i + 3][3] == 1 && (s.substr(i, 3) != s.substr(i + 3, 3))) ||
                (dp[i + 3][2] == 1));
    if (dp[i][2]) v.push_back(s.substr(i, 2));
    if (dp[i][3]) v.push_back(s.substr(i, 3));
  }
}
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> s, n = s.size();
  Fill_dp();
  v.push_back("A");
  sort(v.begin(), v.end());
  for (int i = 1; i < v.size(); i++)
    if (v[i] != v[i - 1]) ans.push_back(v[i]);
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << endl;
}
