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 JAVA):

Solution:
import java.io.*;
import java.util.*;


public class Main implements Runnable {

    int maxn = (int)1e3+11;
    int inf = (int)1e9;
    long mod = (long)1e9+7;
    int n,m,k;
    char c[];

    void solve() throws Exception {
        c = in.sString().toCharArray();
        ArrayList<Pair> list = new ArrayList<>();
        int a[][] = new int[5][5];
        for (int k=0; k<c.length; k++) {
            if (c[k]=='1') {
                if (a[1][1]==0 && a[1][2]==0) {
                    a[1][1] = a[1][2] = 1;
                    list.add(new Pair(1,1));
                } else if (a[1][3]==0 && a[1][4]==0) {
                    a[1][3] = a[1][4] = 1;
                    list.add(new Pair(1,3));
                } else if (a[2][1]==0 && a[2][2]==0) {
                    a[2][1] = a[2][2] = 1;
                    list.add(new Pair(2,1));
                } else if (a[2][3]==0 && a[2][4]==0) {
                    a[2][3] = a[2][4] = 1;
                    list.add(new Pair(1,3));
                }
            } else {
                if (a[3][1]==0 && a[4][1]==0) {
                    a[3][1] = a[4][1] = 1;
                    list.add(new Pair(3,1));
                } else if (a[3][2]==0 && a[4][2]==0) {
                    a[3][2] = a[4][2] = 1;
                    list.add(new Pair(3,2));
                } else if (a[3][3]==0 && a[4][3]==0) {
                    a[3][3] = a[4][3] = 1;
                    list.add(new Pair(3,3));
                } else if (a[3][4]==0 && a[4][4]==0) {
                    a[3][4] = a[4][4] = 1;
                    list.add(new Pair(3,4));
                }
            }

            for (int i=1; i<=4; i++) {
                int cnt = 0;
                for (int j=1; j<=4; j++) {
                    cnt += a[i][j];
                }
                if (cnt==4) {
                    for (int j=1; j<=4; j++) {
                        a[i][j] = 0;
                    }
                }
            }
        }

        for (Pair p : list) {
            out.println(p.x + " " + p.y);
        }
    }

    class Pair {
        int x,y;

        public Pair(int x, int y) {
            this.x = x;
            this.y = y;
        }
    }

    String fileInName = "";

    static Throwable throwable;
    public static void main (String [] args) throws Throwable {
        Thread thread = new Thread(null, new Main(), "", (1 << 26));
        thread.start();
        thread.join();
        thread.run();
        if (throwable != null)
            throw throwable;
    }

    FastReader in;
    PrintWriter out;

    public void run() {

        try {
            if (!fileInName.isEmpty()) {
                in = new FastReader(new BufferedReader(new FileReader(fileInName+".in")));
                out = new PrintWriter(new BufferedWriter(new FileWriter(fileInName+".out")));
            } else {
                in = new FastReader(new BufferedReader(new InputStreamReader(System.in)));
                out = new PrintWriter(System.out);
            }

            solve();
        } catch(Exception e) {
            throwable = e;
        } finally {
            out.close();
        }

    }

    class FastReader {
        BufferedReader bf;
        StringTokenizer tk = null;

        public FastReader(BufferedReader bf) {
            this.bf = bf;
        }

        public Integer iInt() throws Exception {
            return Integer.parseInt(sString());
        }

        public Long lLong() throws Exception {
            return Long.parseLong(sString());
        }

        public Double dDouble() throws Exception {
            return Double.parseDouble(sString());
        }

        public String sString () throws Exception {
            if (tk==null || !tk.hasMoreTokens()) {
                tk = new StringTokenizer(bf.readLine());
            }
            if (!tk.hasMoreTokens()) return sString();
            else
                return tk.nextToken();
        }
    }
}