#include <bits/stdc++.h>
using namespace std;
using P = pair<int, int>;
int main() {
  string s;
  cin >> s;
  char key = s[0];
  int ans = 1;
  int count = 1;
  bool flag = false;
  for (int i = 1; i < s.size() - 1; i++) {
    if (count == 0) {
      ans++;
      count = 1;
      key = s[i];
    } else if (count == 2) {
      ans++;
      count = 0;
    } else if (key != s[i]) {
      ans++;
      key = s[i];
    } else if (key == s[i]) {
      count++;
    }
    cout << count << " " << ans << endl;
  }
  cout << ans + 1 << endl;
}
