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:
import java.io.*;
import java.util.*;

public class Main {
    static FastScanner in;
    static PrintWriter out;
    static final long MOD = 1000000007;
    static boolean[][] dp;
    static List<Integer> ans;

    public static void main(String[] args) throws IOException {
        //        Scanner in = new Scanner(new File("input.txt"));
        //        Scanner in = new Scanner(System.in);
        //        System.setOut(new PrintStream(new BufferedOutputStream(new FileOutputStream("output.txt")), true));
        out = new PrintWriter(System.out);
        in = new FastScanner(System.in);
        //        in = new FastScanner("input.txt");
        char[][] a = new char[11][11];
        for (int i = 0; i < 11; i++) {
            a[i] = in.nextLine().toCharArray();
        }
        int x = in.nextInt() - 1, y = in.nextInt() - 1;
        int c[][] = new int[11][11];
        for (int i = 0; i < 11; i++) {
            for (int j = 0; j < 11; j++) {
                c[i][j] = -1;
            }
        }
        for (int i = 0; i < 11; i += 4) {
            for (int j = 0; j < 11; j += 4) {
                c[i][j] = 0;
            }
            for (int j = 1; j < 11; j += 4) {
                c[i][j] = 1;
            }
            for (int j = 2; j < 11; j += 4) {
                c[i][j] = 2;
            }
        }
        for (int i = 1; i < 11; i += 4) {
            for (int j = 0; j < 11; j += 4) {
                c[i][j] = 3;
            }
            for (int j = 1; j < 11; j += 4) {
                c[i][j] = 4;
            }
            for (int j = 2; j < 11; j += 4) {
                c[i][j] = 5;
            }
        }
        for (int i = 2; i < 11; i += 4) {
            for (int j = 0; j < 11; j += 4) {
                c[i][j] = 6;
            }
            for (int j = 1; j < 11; j += 4) {
                c[i][j] = 7;
            }
            for (int j = 2; j < 11; j += 4) {
                c[i][j] = 8;
            }
        }
        //        for (int i = 0; i < 11; i++) {
        //            for (int j = 0; j < 11; j++) {
        //                out.print(c[i][j] + " ");
        //            }
        //            out.println();
        //        }
        if (x > 5) {
            x = x + 2;
        } else if (x > 2) {
            x = x + 1;
        }
        if (y > 5) {
            y = y + 2;
        } else if (y > 2) {
            y = y + 1;
        }
        int r0l = 0, r0h = 2, c0l = 0, c0h = 2;
        int r1l = 0, r1h = 2, c1l = 4, c1h = 6;
        int r2l = 0, r2h = 2, c2l = 8, c2h = 10;
        int r3l = 4, r3h = 6, c3l = 0, c3h = 2;
        int r4l = 4, r4h = 6, c4l = 4, c4h = 6;
        int r5l = 4, r5h = 6, c5l = 8, c5h = 10;
        int r6l = 8, r6h = 10, c6l = 0, c6h = 2;
        int r7l = 8, r7h = 10, c7l = 4, c7h = 6;
        int r8l = 8, r8h = 10, c8l = 8, c8h = 10;

        switch (c[x][y]) {
        case 0:
            check(a, r0l, r0h, c0l, c0h);
            break;
        case 1:
            check(a, r1l, r1h, c1l, c1h);
            break;
        case 2:
            check(a, r2l, r2h, c2l, c2h);
            break;
        case 3:
            check(a, r3l, r3h, c3l, c3h);
            break;
        case 4:
            check(a, r4l, r4h, c4l, c4h);
            break;
        case 5:
            check(a, r5l, r5h, c5l, c5h);
            break;
        case 6:
            check(a, r6l, r6h, c6l, c6h);
            break;
        case 7:
            check(a, r7l, r7h, c7l, c7h);
            break;
        default:
            check(a, r8l, r8h, c8l, c8h);
            break;
        }
        for (int i = 0; i < 11; i++) {
            out.println(a[i]);
        }
        out.close();
    }

    static void check(char a[][], int rl, int rh, int cl, int ch) {
        boolean ok = false;
        for (int i = rl; i <= rh; i++) {
            for (int j = cl; j <= ch; j++) {
                if (a[i][j] == '.')
                    ok = true;
            }
        }
        if (ok) {
            for (int i = rl; i <= rh; i++) {
                for (int j = cl; j <= ch; j++) {
                    if (a[i][j] == '.')
                        a[i][j] = '!';
                }
            }
        } else {
            for (int i = 0; i < 11; i++) {
                if (i == 3 || i == 7)
                    continue;
                for (int j = 0; j < 11; j++) {
                    //                    System.out.println(i + " " + j);
                    if (a[i][j] != ' ' && a[i][j] == '.') {
                        a[i][j] = '!';
                    }
                }
            }
        }
    }
}

class Pair {
    public int first; //first member of pair
    public int second; //second member of pair

    public Pair(int first, int second) {
        this.first = first;
        this.second = second;
    }

    public Pair() {

    }

    @Override
    public boolean equals(Object o) {
        if (this == o)
            return true;
        if (!(o instanceof Pair))
            return false;
        Pair p = (Pair) o;
        return first == p.first && second == p.second;
    }

    @Override
    public int hashCode() {
        int result = (int) first;
        result = 31 * result + (int) second;
        return result;
    }
}

class PairComparable implements Comparator<Pair> {

    @Override
    public int compare(Pair o1, Pair o2) {
        if (o1.second < o2.second)
            return -1;
        else if (o1.second > o2.second)
            return 1;
        else {
            return 0;
        }
    }
}

class FastScanner {

    BufferedReader br;
    StringTokenizer tokenizer;

    FastScanner(String fileName) throws FileNotFoundException {
        this(new FileInputStream(new File(fileName)));
    }

    FastScanner(InputStream is) {
        br = new BufferedReader(new InputStreamReader(is));
    }

    String nextLine() throws IOException {
        tokenizer = null;
        return br.readLine();
    }

    String next() throws IOException {
        if (tokenizer == null || !tokenizer.hasMoreTokens()) {
            String line = br.readLine();
            if (line == null) {
                return null;
            }
            tokenizer = new StringTokenizer(line);
        }
        return tokenizer.nextToken();
    }

    int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    double nextDouble() throws IOException {
        return Double.parseDouble(next());
    }

    char nextChar() throws IOException {
        return next().charAt(0);
    }
}