#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  string s;
  cin >> s;
  int dp[s.length()][2];
  for (int i = 0; i < s.length(); i++) {
    dp[i][0] = 0;
    dp[i][1] = 0;
  }
  if (s[0] == s[1]) {
    dp[0][0] = 1;
    dp[0][1] = 0;
    dp[1][0] = 1;
    dp[1][1] = 1;
  } else {
    dp[0][0] = 1;
    dp[0][1] = 0;
    dp[1][0] = 2;
    dp[1][1] = 1;
  }
  cout << dp[0][0] << " " << dp[0][1] << endl;
  cout << dp[1][0] << " " << dp[1][1] << endl;
  for (int i = 2; i < s.length(); i++) {
    if (s[i] != s[i - 1]) {
      dp[i][0] = dp[i - 1][0] + 1;
      dp[i][1] = dp[i - 2][0] + 1;
    } else {
      dp[i][0] = dp[i - 1][1] + 1;
      dp[i][1] = dp[i - 2][0] + 1;
    }
    cout << dp[i][0] << " " << dp[i][1] << endl;
  }
  cout << max(dp[s.length() - 1][0], dp[s.length() - 1][1]) << endl;
}
