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 Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
long long modpow(long long input, long long n, long long difference) {
  long long res = 1, y = input;
  while (n > 0) {
    if (n & 1) res = (res * y) % difference;
    y = (y * y) % difference;
    n /= 2;
  }
  return res % difference;
}
template <class T>
T _abs(T n) {
  return (n < 0 ? -n : n);
}
template <class T>
T _max(T input, T b) {
  return (!(input < b) ? input : b);
}
template <class T>
T _min(T input, T b) {
  return (input < b ? input : b);
}
template <class T>
T gcd(T input, T b) {
  return (b != 0 ? gcd<T>(b, input % b) : input);
}
template <class T>
T lcm(T input, T b) {
  return (input / gcd<T>(input, b) * b);
}
inline int fi() {
  int n = 0;
  int ch = getchar();
  while (ch < '0' || ch > '9') ch = getchar();
  while (ch >= '0' && ch <= '9')
    n = (n << 3) + (n << 1) + ch - '0', ch = getchar();
  return n;
}
inline void fo(int input) {
  char snum[20];
  int iterator = 0;
  do {
    snum[iterator++] = input % 10 + 48;
    input = input / 10;
  } while (input != 0);
  iterator = iterator - 1;
  while (iterator >= 0) putchar(snum[iterator--]);
  putchar('\n');
}
const int MOD = 1000000007, INF = 1e9, MAXN = 2e5 + 5;
const long long INFLL = 1e18;
const long long unsigned INFLLU = 18446744073709551615ULL;
const long double EPS = 1e-12;
inline int inv(int input, int p = MOD) { return modpow(input, p - 2, p); }
inline int sign(long double x) { return x < -EPS ? -1 : x > +EPS; }
inline void addmod(int& input, int val, int p = MOD) {
  if ((input = (input + val)) >= p) input -= p;
}
inline void submod(int& input, int val, int p = MOD) {
  if ((input = (input - val)) < 0) input += p;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string s;
  cin >> s;
  bool occv = false, occh = false;
  for (auto& x : s) {
    if (x == '0') {
      if (occv)
        cout << "3 4\n";
      else
        cout << "1 4\n";
      occv = !occv;
    } else {
      if (occh)
        cout << "4 3\n";
      else
        cout << "4 1\n";
      occh = !occh;
    }
  }
  cerr << "Time elapsed :" << clock() * 1000.0 / CLOCKS_PER_SEC << " ms"
       << '\n';
  return 0;
}