#include <bits/stdc++.h>
using namespace std;
int find(string s) {
  if (s.size() <= 1) return -1;
  for (int i = 0; i < s.size() - 1; i++) {
    if (s[i] != s[i + 1]) return i;
  }
  return -1;
}
int main() {
  string s;
  cin >> s;
  int l = s.size();
  while (find(s) != -1) {
    int p = find(s);
    s.erase(p, 2);
    cout << p << ' ' << s << endl;
  }
  cout << l - s.size();
}
