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.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.*;
 
public class Main {
	public static void main(String[] args) {
		InputReader in = new InputReader();
		PrintWriter out = new PrintWriter(System.out);
		Thread th = new Thread(null, new Runnable(){public void run(){new Task1().solve(in, out);}},"Task1",1<<24);
		try{
			th.start();
			th.join();
		} catch(InterruptedException e){}
		out.close();
	}

	static class Task1{
		static final int MAX = (int)1e6+1;
		static final int MOD = 1000000007;
		static final boolean debug = false;

		
		public void solve(InputReader in, PrintWriter out){
			String s = in.next()+"11";
			int n = s.length()-2;

			int[] px = new int[n+2];
			int[] py = new int[n+2];
			int state = 1;

			if(s.charAt(0)=='0'){
				state = 0;
				px[0] = 1;
				py[0] = 4;
			} else {
				state = 1;
				px[0] = 4;
				py[0] = 1;
			}

			for(int i=0; i<n; i+=2){
				String future = s.charAt(i+1)+""+s.charAt(i+2);
				if(state == 0){	// vertical
					switch(future){
						case "00":
							px[i+1] = 3;
							py[i+1] = 4;
							px[i+2] = 1;
							py[i+2] = 4;
							state = 0;
						break;

						case "01":
							px[i+1] = 3;
							py[i+1] = 4;
							px[i+2] = 4;
							py[i+2] = 1;
							state = 1;
						break;

						case "10":
							px[i+1] = 4;
							py[i+1] = 1;
							px[i+2] = 3;
							py[i+2] = 4;
							state = 1;
						break;

						case "11":
							px[i+1] = 4;
							py[i+1] = 1;
							px[i+2] = 4;
							py[i+2] = 3;
							state = 0;
						break;

						default:
						throw new InputMismatchException("Invalid input");
					}
				} else if(state == 1){	// horizontal
					switch(future){
						case "00":
							px[i+1] = 1;
							py[i+1] = 4;
							px[i+2] = 3;
							py[i+2] = 4;
							state = 1;
						break;

						case "01":
							px[i+1] = 1;
							py[i+1] = 4;
							px[i+2] = 4;
							py[i+2] = 3;
							state = 0;
						break;

						case "10":
							px[i+1] = 4;
							py[i+1] = 3;
							px[i+2] = 1;
							py[i+2] = 4;
							state = 0;
						break;

						case "11":
							px[i+1] = 4;
							py[i+1] = 3;
							px[i+2] = 4;
							py[i+2] = 1;
							state = 1;
						break;

						default:
						throw new InputMismatchException("Invalid input");
					}
				}
			}

			for(int i=0; i<n; i++){
				out.println(px[i]+" "+py[i]);
			}
		}

		public static int lowerBound(int[] array, int length, int value) {
	        int low = 0;
	        int high = length-1;
	        while (low < high) {
	            final int mid = low + (high-low)/2;
	            if (value <= array[mid]) {
	                high = mid;
	            } else {
	                low = mid + 1;
	            }
	        }
	        return low;
	    }
		
		long gcd(long a, long b){
			while(a>0){
				long rem = b%a;
				b = a;
				a = rem;
			}
			return b;
		}

		long expo(long a, long b, long MOD){
			long result = 1;
			while (b>0){
				if (b%2==1) result=(result*a)%MOD;
				b>>=1;
				a=(a*a)%MOD;
			}
			return result%MOD;
		}

		long inverseModullo(long numerator, long denominator, long MOD){
			return ((numerator )*(expo(denominator, MOD-2, MOD))) ;
		}
	}
 	
	static class InputReader{
		final InputStream stream;
		final byte[] buf = new byte[8192];
		int curChar, numChars;
		SpaceCharFilter filter;
		public InputReader(){
			this.stream = System.in;
		}
		public int read(){
			if(numChars == -1) throw new InputMismatchException();
			if(curChar >= numChars){
				curChar = 0;
				try{
					numChars = stream.read(buf);
				} catch(IOException e){
					throw new InputMismatchException();
				}
				if(numChars <= 0) return -1;
			}
			return buf[curChar++];
		}
		public int nextInt(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			int sgn = 1;
			if(c == '-'){
				sgn = -1;
				c = read();
			}
			int res = 0;
			do{
				if(c<'0' || c>'9') throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while(!isSpaceChar(c));
			return res*sgn;
		}
		public long nextLong(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			int sgn = 1;
			if(c == '-'){
				sgn = -1;
				c = read();
			}
			long res = 0;
			do{
				if(c<'0' || c>'9') throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = read();
			} while(!isSpaceChar(c));
			return res*sgn;
		}
		public String next(){
			int c = read();
			while(isSpaceChar(c)) c = read();
			StringBuilder res = new StringBuilder();
			do{
				res.appendCodePoint(c);
				c = read();
			}while(!isSpaceChar(c));
			return res.toString();
		}
		public boolean isSpaceChar(int c){
			if(filter != null) return filter.isSpaceChar(c);
			return c==' ' || c=='\n' || c=='\r' || c=='\t' || c==-1;
		}
		public interface SpaceCharFilter{
			public boolean isSpaceChar(int ch);
		}
	}
}