Problem: Two bears are playing tic-tac-toe via mail. It's boring for them to play usual tic-tac-toe game, so they are a playing modified version of this game. Here are its rules.

The game is played on the following field.

<image>

Players are making moves by turns. At first move a player can put his chip in any cell of any small field. For following moves, there are some restrictions: if during last move the opposite player put his chip to cell with coordinates (xl, yl) in some small field, the next move should be done in one of the cells of the small field with coordinates (xl, yl). For example, if in the first move a player puts his chip to lower left cell of central field, then the second player on his next move should put his chip into some cell of lower left field (pay attention to the first test case). If there are no free cells in the required field, the player can put his chip to any empty cell on any field.

You are given current state of the game and coordinates of cell in which the last move was done. You should find all cells in which the current player can put his chip.

A hare works as a postman in the forest, he likes to foul bears. Sometimes he changes the game field a bit, so the current state of the game could be unreachable. However, after his changes the cell where the last move was done is not empty. You don't need to find if the state is unreachable or not, just output possible next moves according to the rules.

Input

First 11 lines contains descriptions of table with 9 rows and 9 columns which are divided into 9 small fields by spaces and empty lines. Each small field is described by 9 characters without spaces and empty lines. character "x" (ASCII-code 120) means that the cell is occupied with chip of the first player, character "o" (ASCII-code 111) denotes a field occupied with chip of the second player, character "." (ASCII-code 46) describes empty cell.

The line after the table contains two integers x and y (1 ≤ x, y ≤ 9). They describe coordinates of the cell in table where the last move was done. Rows in the table are numbered from up to down and columns are numbered from left to right.

It's guaranteed that cell where the last move was done is filled with "x" or "o". Also, it's guaranteed that there is at least one empty cell. It's not guaranteed that current state of game is reachable.

Output

Output the field in same format with characters "!" (ASCII-code 33) on positions where the current player can put his chip. All other cells should not be modified.

Examples

Input

... ... ...
... ... ...
... ... ...

... ... ...
... ... ...
... x.. ...

... ... ...
... ... ...
... ... ...
6 4


Output

... ... ... 
... ... ... 
... ... ... 

... ... ... 
... ... ... 
... x.. ... 

!!! ... ... 
!!! ... ... 
!!! ... ... 



Input

xoo x.. x..
ooo ... ...
ooo ... ...

x.. x.. x..
... ... ...
... ... ...

x.. x.. x..
... ... ...
... ... ...
7 4


Output

xoo x!! x!! 
ooo !!! !!! 
ooo !!! !!! 

x!! x!! x!! 
!!! !!! !!! 
!!! !!! !!! 

x!! x!! x!! 
!!! !!! !!! 
!!! !!! !!! 



Input

o.. ... ...
... ... ...
... ... ...

... xxx ...
... xox ...
... ooo ...

... ... ...
... ... ...
... ... ...
5 5


Output

o!! !!! !!! 
!!! !!! !!! 
!!! !!! !!! 

!!! xxx !!! 
!!! xox !!! 
!!! ooo !!! 

!!! !!! !!! 
!!! !!! !!! 
!!! !!! !!! 

Note

In the first test case the first player made a move to lower left cell of central field, so the second player can put a chip only to cells of lower left field.

In the second test case the last move was done to upper left cell of lower central field, however all cells in upper left field are occupied, so the second player can put his chip to any empty cell.

In the third test case the last move was done to central cell of central field, so current player can put his chip to any cell of central field, which is already occupied, so he can move anywhere. Pay attention that this state of the game is unreachable.

Solution (in JAVA):

Solution:
/* 
 * UMANG PANCHAL
 * DAIICT
 */
import java.util.*;
import java.io.*;
import java.math.BigInteger;
public class Main
{
 
	static LinkedList<Integer> adj[];
	static ArrayList<Integer> adj1[];
	static int[] color,visited1;
	static boolean b[],visited[],possible;
	static int level[];
	static Map<Integer,HashSet<Integer>> s;
	static int totalnodes,colored;
	static int count[];
	static long sum[];
	static int nodes;
	static double ans=0;
	static long[] as=new long[10001];
	static long c1=0,c2=0;
	static int[] a,d,k;
	static int max=100000000;
	static long MOD = (long)1e9 + 7,sm=0,m=Long.MIN_VALUE;
	static boolean[] prime=new boolean[1000005];
	static int[] levl;
    static int[] eat;
   // static int n,m;
    static int price[];
    static int size[],res[],par[];
    //ind frog crab
static int result=0;
	// --------------------My Code Starts Here----------------------
	
	public static void main(String[] args) throws IOException
	{
		in=new InputReader(System.in);
		w=new PrintWriter(System.out);
    
		char d[][]=new char[10][10];
	      
	      for(int i=1;i<=9;i++)
	      {
	    	  String s=ns();
	    	  
	    	  for(int j=0;j<3;j++)
	    	  {
	    		  d[i][j+1]=s.charAt(j);
	    	  }
	    	  for(int j=4;j<=6;j++)
	    	  {
	    		  d[i][j]=s.charAt(j);
	    	  }
	    	  for(int j=8;j<=10;j++)
	    	  {
	    		  d[i][j-1]=s.charAt(j);
	    	  }
	      }
	      
	      
	      
	      int x=ni();
	      int y=ni();
	      
	      boolean f=false;
	      if((x==1 || x==4 || x==7) && (y==1||y==4||y==7))
	      	{
	    	 
	    	  for(int i=1;i<=3;i++)
	    	  {
	    		  for(int j=1;j<=3;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				  d[i][j]='!';
	    			  }
	    		  }
	    	  }
	    	  
	    	  
	 		}
	      else if((x==1 || x==4 || x==7) && (y==3||y==6||y==9))
	  		{
	    	  for(int i=1;i<=3;i++)
	    	  {
	    		  for(int j=7;j<=9;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				  d[i][j]='!';
	    			  }
	    		  }
	    	  }
			}
	      
	      else if((x==1 || x==4 || x==7) && (y==2||y==5||y==8))
	    	{
	    	  for(int i=1;i<=3;i++)
	    	  {
	    		  for(int j=4;j<=6;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				  d[i][j]='!';
	    			  }
	    		  }
	    	  }
			}
	      else if((x==2 || x==5 || x==8) && (y==2||y==5||y==8))
	   			{
	   	    	  for(int i=4;i<=6;i++)
	   	    	  {
	   	    		  for(int j=4;j<=6;j++)
	   	    		  {
	   	    			  if(d[i][j]=='.')
	   	    			  {
	   	    				  f=true;
	   	    				  d[i][j]='!';
	   	    			  }
	   	    		  }
	   	    	  }
	   			}
	      
	      else if((x==2 || x==5 || x==8) && (y==1||y==4||y==7))
	  		{
	    	  	
	    	  for(int i=4;i<=6;i++)
	    	  {
	    		  for(int j=1;j<=3;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				 d[i][j]='!';
	    			  }
	    		  }
	    	  }
			}
	   
	      else if((x==2 || x==5 || x==8) && (y==3||y==6||y==9))
			{
		 
	    	  for(int i=4;i<=6;i++)
	    	  {
	    		  for(int j=7;j<=9;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				  d[i][j]='!';
	    			  }
	    		  }
	    	  }
			}
	      
	      
	      else if((x==3 || x==6 || x==9) && (y==1||y==4||y==7))
			{
	    	  for(int i=7;i<=9;i++)
	    	  {
	    		  for(int j=1;j<=3;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				  d[i][j]='!';
	    			  }
	    		  }
	    	  }
			}
	      else if((x==3 || x==6 || x==9) && (y==2||y==5||y==8))
			{
	    	  for(int i=7;i<=9;i++)
	    	  {
	    		  for(int j=4;j<=6;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				  d[i][j]='!';
	    			  }
	    		  }
	    	  }
			}
	      else if((x==3 || x==6 || x==9) && (y==3||y==6||y==9))
			{
	    	  for(int i=7;i<=9;i++)
	    	  {
	    		  for(int j=7;j<=9;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    			  {
	    				  f=true;
	    				  d[i][j]='!';
	    			  }
	    		  }
	    	  }
			}
	      
	      if(f==false)
	      {
	    	  for(int i=1;i<=9;i++)
	    	  {
	    		  for(int j=1;j<=9;j++)
	    		  {
	    			  if(d[i][j]=='.')
	    				  d[i][j]='!';
	    		  }
	    	  }
	      }
	      
	      
	      for(int i=1;i<=9;i++)
	      {
	    	  String s="";
	    	  
	    	  for(int j=1;j<=3;j++)
	    		  s+=d[i][j];
	    	  s+=" ";
	    	  for(int j=4;j<=6;j++)
	    		  s+=d[i][j];
	    	  s+=" ";
	    	  for(int j=7;j<=9;j++)
	    		  s+=d[i][j];
	    	  
	    	  if(i==4 || i==7)
	    		  w.println("");
	    	  w.println(s);
	    	  
	    	  
	      }
		
		
		
		
		
		
		
		
		/* int n=ni();
     //in.nextLine();
     HashSet<Character> h=new HashSet<Character>();
     HashSet<Character> h1=new HashSet<Character>();
     String[] a=new String[n];
     int ts=0;
     for(int i=0;i<n;i++)
    	 {a[i]=in.nextLine();
    	   if(a[i].charAt(0)=='.')
    		   ts++;
    	 }
     ts=n-1-ts;
     int c=0,i=0;
     while(i<n-1 && h.size()!=1)
     {
    	 if(a[i].charAt(0)=='.')
    	 {
    		 for(int j=2;j<a[i].length();j++)
    			 h1.add(a[i].charAt(j));
    	 }
    	 else
    	 {
    		 c++;
    		 for(int j=2;j<a[i].length();j++)
    			 h.add(a[i].charAt(j));
    	 }
    	for(char k:h1)
    	{
    		if(h.contains(k))
    			h.remove(k);
    	}
    	i++;
    	if(h.size()==1)
    		break;
     }
	 w.print(ts-c);
	*/
		
		/* long n=nl(),m=nl(),k=nl();
	    String s=ns();
	    long sum=0;
	    for(int i=0;i<s.length();i++)
	    	sum+=s.charAt(i)-'a'+1;
	    long lb=n,ub=26*n;
	    long d=k-sum;
	    while(d<lb)
	    	d=d+m;
	    long ans=0;
	    while(d<ub)
	    {
	    	long p=nCrModp(d-1,n-1,MOD);
	    	long g=fact(n-1);
	    	long x=0;
	    	  for(int i=1;i<=Math.floor(d/26);i++)
	    	  {
	              long t=(d-i*26-1)%MOD;
	              for(long j=t-1;j>=d-i*26-n+1;j--)
	            	  t=(t*(i%MOD))%MOD;
	              t=t%MOD;
	              t=(t*(n%MOD))%MOD;
	              t=(t/g%MOD)%MOD;
	              g=(g*((i+1)%MOD)%MOD);
	              g=(g/((n-i)%MOD))%MOD;
	              if(i%2==1)
	            	  x=(x%MOD+g%MOD)%MOD;
	              else
	            	  x=(x%MOD-g%MOD+MOD)%MOD;
	              
	    	  }
	    	  long a=(p%MOD-x%MOD)%MOD;
	    	  ans=(ans%MOD+a%MOD)%MOD;
	    	  d+=m;
	    }
	   w.println(ans%MOD);
	    */
       w.close();
    }
	
	public static long fact(long n)
	{
		long p=n%MOD;
		for(long i=n-1;i>=1;i--)
			p=(p*(i%MOD))%MOD;
		return p%MOD;
	}
	public static long nCrModp(long n, long r, long p)
	{
	    
	    long[] C=new long[(int)r+1];
	    
	 
	    C[0] = 1; 
	    
	    for (long i = 1; i <= n; i++)
	    {
	        
	        for (long j = Math.min(i, r); j > 0; j--)
	 
	            
	            C[(int)j] = (C[(int)j] + C[(int)(j-1)])%p;
	    }
	    return C[(int)r];
	}
	public static long nCr(long n, long r)
	{
		long x=1;
		for(long i=n;i>=n-r+1;i--)
			x=((x)*(i));
		for(long i=r;i>=1;i--)
			x=((x)/(i));
		
		return x%MOD;
	}
	public static long nCrModpDP(long n, long r, long p)
	{
	
	    long[] C=new long[(int)r+1];
	 
	    C[0] = 1; 
	 
	 
	    for (long i = 1; i <= n; i++)
	    {
	        for (int j = (int)Math.min(i, r); j > 0; j--)
	           C[j] = (C[j] + C[j-1])%p;
	    }
	    return C[(int)r];
	}

	public static long nCrModpLucas(long n,long r, long p)
	{
	  
	   if (r==0)
	      return 1;
	 
	   long ni = n%p, ri = r%p;
	
	   return (nCrModpLucas(n/p,r/p, p) * nCrModpDP(ni,ri, p)) % p;  
	}
	
	 public static void buildgraph(int n){
         adj=new LinkedList[n+1];
         visited=new boolean[n+1];
         levl=new int[n+1];
         par=new int[n+1];
         for(int i=0;i<=n;i++){
             adj[i]=new LinkedList<Integer>();
         
         }


     }
	public static int getSum(long BITree[], int index)
	{
	    int sum = 0;
	    
	    while (index > 0)
	    {
	        sum += BITree[index];
	        index -= index & (-index);
	    }
	    return sum;
	}
	
	public static long[] updateBIT(long BITree[], int n, int index, int val)
	{
	    while (index <= n)
	    {
	       BITree[index] += val;
	       index += index & (-index);
	    }
	    return BITree;
	}
	

	
	public static boolean isPrime(int n)
	{
	    // Corner cases
	    if (n <= 1)  return false;
	    if (n <= 3)  return true;
	 
	    // This is checked so that we can skip 
	    // middle five numbers in below loop
	    if (n%2 == 0 || n%3 == 0)
	    	return false;
	 
	    for (int i=5; i*i<=n; i=i+6)
	        if (n%i == 0 || n%(i+2) == 0)
	           return false;
	 
	    return true;
	}
	
	// --------------------My Code Ends Here------------------------
	
	public static String ns()
	{
		return in.nextLine();
	}
	public static int ni()
	{
		return in.nextInt();
	}
	public static long nl()
	{
		return in.nextLong();
	}
	public static int[] na(int n)
	{
		a=new int[n];
		for(int i=0;i<n;i++)
		a[i]=ni();
		return a;
	}
	public static void sieveOfEratosthenes()
	    {
	       int n=prime.length;
	        for(int i=0;i<n;i++)
	            prime[i] = true;
	         
	        for(int p = 2; p*p <=n; p++)
	        {
	            if(prime[p] == true)
	            {
	                for(int i = p*2; i <n; i += p)
	                    prime[i] = false;
	            }
	        }
	    }

	public static boolean printDivisors(long n)
    {
		long ans=0;
        for (int i=1; i<=Math.sqrt(n); i++)
        {
            if (n%i==0)
            {
                if (n/i == i)
                    ans++;
                else 
                {
                	ans=ans+2;
                }
            }
            if(ans>3)
            	break;
        }
        if(ans==3)
        	return true;
        else
        	return false;
    }

  public static void dfs(int i)
  {
	  visited[i]=true;
	  for(int j:adj[i])
	  {
		  if(!visited[j])
			  {
			  dfs(j);
			  nodes++;
			  }
	  }
	  
  }
  public static String rev(String s)
	{
		StringBuilder sb=new StringBuilder(s);
		sb.reverse();
		return sb.toString();
	}
	static long lcm(long a, long b)
	{
	    return a * (b / gcd(a, b));
	}
	static long gcd(long a, long b)
	{
	    while (b > 0)
	    {
	        long temp = b;
	        b = a % b; // % is remainder
	        a = temp;
	    }
	    return a;
	}
	static InputReader in;
	static PrintWriter w;
static class InputReader 
{
 
private final InputStream stream;
private final byte[] buf = new byte[8192];
private int curChar, snumChars;
private SpaceCharFilter filter;
 
public InputReader(InputStream stream)
{
  this.stream = stream;
}
 
public int snext()
{
  if (snumChars == -1)
    throw new InputMismatchException();
  if (curChar >= snumChars)
  {
    curChar = 0;
    try 
    {
      snumChars = stream.read(buf);
    }
    catch (IOException e)
    {
      throw new InputMismatchException();
    }
    if (snumChars <= 0)
      return -1;
  }
  return buf[curChar++];
}
 
public int nextInt() 
{
  int c = snext();
  while (isSpaceChar(c)) 
  {
    c = snext();
  }
  int sgn = 1;
  if (c == '-')
  {
    sgn = -1;
    c = snext();
  }
  int res = 0;
  do
  {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = snext();
  }
  while (!isSpaceChar(c));
  return res * sgn;
}
 
public long nextLong() 
{
  int c = snext();
  while (isSpaceChar(c)) 
  {
    c = snext();
  }
  int sgn = 1;
  if (c == '-')
  {
    sgn = -1;
    c = snext();
  }
  long res = 0;
  do
  {
    if (c < '0' || c > '9')
      throw new InputMismatchException();
    res *= 10;
    res += c - '0';
    c = snext();
  }
  while (!isSpaceChar(c));
  return res * sgn;
}	    
public String readString() 
{
  int c = snext();
  while (isSpaceChar(c)) 
  {
    c = snext();
  }
  StringBuilder res = new StringBuilder();
  do
  {
    res.appendCodePoint(c);
    c = snext();
  }
  while (!isSpaceChar(c));
  return res.toString();
}
 
public String nextLine() 
{
  int c = snext();
  while (isSpaceChar(c))
    c = snext();
  StringBuilder res = new StringBuilder();
  do
  {
    res.appendCodePoint(c);
    c = snext();
  }
  while (!isEndOfLine(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;
}
 
private boolean isEndOfLine(int c) 
{
  return c == '\n' || c == '\r' || c == -1;
}
 
public interface SpaceCharFilter
{
  public boolean isSpaceChar(int ch);
}
}
	
}