Problem: You are given a 4x4 grid. You play a game — there is a sequence of tiles, each of them is either 2x1 or 1x2. Your task is to consequently place all tiles from the given sequence in the grid. When tile is placed, each cell which is located in fully occupied row or column is deleted (cells are deleted at the same time independently). You can place tile in the grid at any position, the only condition is that tiles (and tile parts) should not overlap. Your goal is to proceed all given figures and avoid crossing at any time.

Input

The only line contains a string s consisting of zeroes and ones (1 ≤ |s| ≤ 1000). Zero describes vertical tile, one describes horizontal tile.

Output

Output |s| lines — for each tile you should output two positive integers r,c, not exceeding 4, representing numbers of smallest row and column intersecting with it.

If there exist multiple solutions, print any of them.

Example

Input


010


Output


1 1
1 2
1 4

Note

Following image illustrates the example after placing all three tiles: 

<image> Then the first row is deleted:  <image>

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <typename F, typename S>
ostream &operator<<(ostream &os, const pair<F, S> &p) {
  return os << "(" << p.first << ", " << p.second << ")";
}
template <typename T>
ostream &operator<<(ostream &os, const vector<T> &v) {
  os << "{";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "}";
}
template <typename T>
ostream &operator<<(ostream &os, const set<T> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename T>
ostream &operator<<(ostream &os, const multiset<T> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << *it;
  }
  return os << "]";
}
template <typename F, typename S>
ostream &operator<<(ostream &os, const map<F, S> &v) {
  os << "[";
  for (auto it = v.begin(); it != v.end(); ++it) {
    if (it != v.begin()) os << ", ";
    os << it->first << " = " << it->second;
  }
  return os << "]";
}
void faltu() { cerr << endl; }
template <typename T>
void faltu(T a[], int n) {
  for (int i = 0; i < n; ++i) cerr << a[i] << ' ';
  cerr << endl;
}
template <typename T, typename... hello>
void faltu(T arg, const hello &...rest) {
  cerr << arg << ' ';
  faltu(rest...);
}
const int fx[] = {+1, -1, +0, +0};
const int fy[] = {+0, +0, +1, -1};
long long Set(long long &N, long long pos) { return N = N | (1ll << pos); }
long long Reset(long long &N, long long pos) { return N = N & ~(1ll << pos); }
bool check(long long N, long long pos) { return (bool)(N & (1ll << pos)); }
void INITIALIZE() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
void Binary(long long x) {
  for (int i = 31; i >= 0; i--) {
    if ((1 << i) & x)
      cerr << "1";
    else
      cerr << "0";
  }
  cerr << "\n";
}
bool cmp(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second > b.second);
}
long long ncr(int n, int r) {
  long long ans = 1;
  if (r > n - r) r = n - r;
  for (long long i = 1; i <= r; i++) {
    ans *= (n - i + 1), ans /= i;
  }
  return ans;
}
long long pow(long long a, long long b) {
  long long res = 1;
  while (b > 0) {
    if (b & 1) res = (res * a) % 1000000007;
    b >>= 1;
    a = (a * a) % 1000000007;
  }
  return res;
}
int mul(int a, int b) {
  return ((a % 1000000007) * (b % 1000000007)) % 1000000007;
}
int add(int a, int b) {
  return ((a % 1000000007) + (b % 1000000007)) % 1000000007;
}
bool isBad(int a, int b, int c) { return a + b > c && b + c > a && c + a > b; }
void solve() {
  string s;
  cin >> s;
  int z = 1, o = 1;
  for (char c : s) {
    if (c == '1') {
      if (o)
        cout << 1 << " " << 1 << endl;
      else
        cout << 1 << " " << 3 << endl;
      o ^= 1;
    } else {
      if (z)
        cout << 3 << " " << 4 << endl;
      else
        cout << 1 << " " << 4 << endl;
      z ^= 1;
    }
  }
}
int main() {
  INITIALIZE();
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}