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.math.BigInteger;
		import java.sql.Array;
		import java.util.ArrayList;
			import java.util.Arrays;
			import java.util.Collection;
			import java.util.Collections;
			import java.util.Comparator;
			import java.util.HashMap;
			import java.util.InputMismatchException;
			import java.util.Iterator;
			import java.util.LinkedHashSet;
			import java.util.LinkedList;
			import java.util.List;
			import java.util.Map;
			import java.util.Map.Entry;	
			import java.util.PriorityQueue;
			import java.util.Queue;
			import java.util.Scanner;
			import java.util.Set;
			import java.util.Stack;
			import java.io.BufferedReader;
			import java.io.IOException;
			import java.io.InputStream;
			import java.io.InputStreamReader;
			import java.util.Scanner;
			import java.util.StringTokenizer;
			import java.util.TreeMap;
			import java.util.TreeSet;
			
			public class Main {
				
				static InputReader rd=new InputReader(System.in);
				public static void main(String[] args) {
					
					StringBuilder sb=new StringBuilder(rd.readString());
					
					int n=sb.length();
					
					int o=0;int z=0;
					
					for(int i=0;i<n;i++) {
						
						if(sb.charAt(i)=='1')o++;
						else if(sb.charAt(i)=='0')z++;
						
					}
					int c=1;int r=1;
					
					int k=z-(z%4);
					boolean occ[]=new boolean [n];
					
					
					int cz=1;int co=1;
					for(int i=0;i<n;i++) {
						
						if(sb.charAt(i)=='1') {
							
						System.out.println(1+" "+co);
						co+=2;
						if(co>4)co=1;
						}
						else {
							
							System.out.println(3+" "+cz);
							cz++;
							if(cz>4)cz=1;
							}
							
						
					}
					
				
				
				
						
						
						
				
				}
				
				static class Helper{
					char val;int index;
					public Helper(char val,int index) {
						
						this.val=val;
						this.index=index;
						// TODO Auto-generated constructor stub
					}
				}
			
					
				
	
				
				
				
				  static class InputReader {
				        private InputStream stream;
				        private byte[] buf = new byte[1024];
				        private int curChar;
				        private int numChars;
				        private SpaceCharFilter filter;
			
				        public InputReader(InputStream stream) {
				            this.stream = stream;
				        }
			
				        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 readInt() {
				            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 String readString() {
			    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 String next() {
				            return readString();
				        }
			
				    }
				
				  public interface SpaceCharFilter {
				        public boolean isSpaceChar(int ch);
				    }	
				
				
													
													
													
										
			}