#include <bits/stdc++.h>
using namespace std;
const long long N = 10;
const long long INF = 1e17 + 10;
const long long mod = 1e9 + 7;
long long n, m, i, j, x, y, c[N][N];
void check() {
  long long i, j;
  for (i = 1; i <= 4; ++i) {
    long long f = 0;
    for (j = 1; j <= 4; ++j)
      if (c[i][j] == 0) f = 1;
    if (!f)
      for (j = 1; j <= 4; ++j) c[i][j] = 2;
  }
  for (j = 1; j <= 4; ++j) {
    long long f = 0;
    for (i = 1; i <= 4; ++i)
      if (c[i][j] == 0) f = 1;
    if (!f)
      for (i = 1; i <= 4; ++i) c[i][j] = 2;
  }
  for (i = 1; i <= 4; ++i)
    for (j = 1; j <= 4; ++j)
      if (c[i][j] == 2) c[i][j] = 0;
}
long long f(long long x1, long long y1, long long x2, long long y2) {
  c[x1][y1] = 1;
  c[x2][y2] = 1;
  long long i, f = 1, x = 0;
  for (i = 1; i <= 4; ++i) f &= c[i][y1];
  x += f, f = 1;
  for (i = 1; i <= 4; ++i) f &= c[i][y2];
  x += f, f = 1;
  for (i = 1; i <= 4; ++i) f &= c[x1][i];
  x += f, f = 1;
  for (i = 1; i <= 4; ++i) f &= c[x2][i];
  c[x1][y1] = 0;
  c[x2][y2] = 0;
  return x;
}
int main() {
  for (i = 0; i <= 5; ++i) c[i][0] = c[i][5] = 1;
  for (i = 0; i <= 5; ++i) c[0][i] = c[5][i] = 1;
  vector<pair<long long, long long> > r;
  string s;
  cin >> s;
  n = s.size();
  for (i = 0; i < n; ++i) {
    if (s[i] == '0') {
      long long ans = -1, cx, cy;
      for (x = 1; x <= 4; ++x)
        for (y = 1; y <= 4; ++y)
          if (c[x][y] == 0 && c[x + 1][y] == 0) {
            long long s = f(x, y, x + 1, y);
            if (ans < s) ans = s, cx = x, cy = y;
          }
      if (ans == -1) return cout << "Error" << endl, 0;
      c[cx][cy] = 1;
      c[cx + 1][cy] = 1;
      check();
      r.push_back({cx, cy});
    } else {
      long long ans = -1, cx, cy;
      for (x = 1; x <= 4; ++x)
        for (y = 1; y <= 4; ++y)
          if (c[x][y] == 0 && c[x][y + 1] == 0) {
            long long s = f(x, y, x, y + 1);
            if (ans < s) ans = s, cx = x, cy = y;
          }
      if (ans == -1) return cout << "Error" << endl, 0;
      c[cx][cy] = 1;
      c[cx][cy + 1] = 1;
      check();
      r.push_back({cx, cy});
    }
    long long i, j;
  }
  for (auto it : r) cout << it.first << " " << it.second << endl;
}
