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

Solution:
#include <bits/stdc++.h>
using namespace std;
struct point {
  long double x, y;
  point() {
    x = 0;
    y = 0;
  }
  bool operator==(const point& b) { return x == b.x and y == b.y; }
  point(long double x1, long double y1) {
    x = x1;
    y = y1;
  }
  long double dist(point b) {
    return sqrt((b.x - x) * (b.x - x) + (y - b.y) * (y - b.y));
  }
  bool point_on_sig(point& a, point& b) {
    return a.dist(b) == dist(a) + dist(b);
  }
  long double polar_angle() {
    long double alpha = atan2(y, x);
    long double pi = 3.141592654;
    if (alpha < 0) alpha += 2 * pi;
    return alpha;
  }
};
struct line {
  long double A, B, C;
  line() {
    A = 0;
    B = 0;
    C = 0;
  }
  line(point& a, point& b) {
    A = a.y - b.y;
    B = b.x - a.x;
    C = -A * a.x - B * a.y;
  }
  line(long double a, long double b, long double c) {
    A = a;
    B = b;
    C = c;
  }
  point intersect_lines(line& a) {
    point p;
    p.x = -(((C * a.B) - (a.C * B)) / ((A * a.B) - (a.A * B)));
    p.y = -(((A * a.C) - (a.A * C)) / ((A * a.B) - (a.A * B)));
    return p;
  }
  bool intersect(line& b) { return A * b.B - B * b.A != 0; }
  long double distance_perpendicular(point& d) {
    return abs(A * d.x + B * d.y + C) / (sqrt(A * A + B * B));
  }
};
struct vc {
  long double x, y;
  vc() {
    x = 0;
    y = 0;
  }
  vc(long double x_, long double y_) {
    x = x_;
    y = y_;
  }
  vc(const point& a) {
    x = a.x;
    y = a.y;
  }
  vc minus(const vc& b) { return vc(x - b.x, y - b.y); }
  long double len() { return sqrt(x * x + y * y); }
  long double scalar(const vc& b) { return x * b.x + y * b.y; }
  long double vector(const vc& b) { return x * b.y - y * b.x; }
  long double angle(const vc& b) { return atan2(vector(b), scalar(b)); }
};
vector<int> top;
void top_sort(int v, vector<int> nodes[], int used[], int colors[]) {
  if (colors[v] == 1) {
    cout << -1;
    exit(0);
  } else if (colors[v] == 0)
    colors[v] = 1;
  for (int i = 0; i < nodes[v].size(); ++i) {
    if (used[nodes[v][i]] == 0) top_sort(nodes[v][i], nodes, used, colors);
  }
  top.push_back(v + 1);
  used[v] = 1;
  colors[v] = 2;
}
vector<int> z_function(string s) {
  vector<int> z(s.size());
  for (int i = 1, l = 0, r = 0; i < s.size(); ++i) {
    if (i <= r) z[i] = min(r - i + 1, z[i - l]);
    while (i + z[i] < s.size() && s[z[i]] == s[i + z[i]]) ++z[i];
    if (i + z[i] - 1 > r) l = i, r = i + z[i] - 1;
  }
  return z;
}
vector<int> p_function(string s) {
  vector<int> p(s.size());
  for (int i = 1; i < s.size(); ++i) {
    int j = p[i - 1];
    while (j > 0 && s[i] != s[j]) j = p[j - 1];
    if (s[i] == s[j]) ++j;
    p[i] = j;
  }
  return p;
}
vector<int> now_ans;
void dfs(int v, vector<int> nodes[], int colors[], int turn) {
  if (colors[v] == 1) {
    now_ans.push_back(0);
    return;
  } else if (colors[v] == 0)
    colors[v] = 1;
  for (int i = 0; i < nodes[v].size(); ++i) {
    if (turn == 1)
      dfs(nodes[v][i], nodes, colors, 2);
    else
      dfs(nodes[v][i], nodes, colors, 1);
  }
  if (nodes[v].empty()) {
    now_ans.push_back(turn);
    return;
  }
  colors[v] = 2;
}
int parents[500000];
void create(int v) { parents[v] = v; }
int find_parent(int v) {
  if (v == parents[v]) return v;
  return find_parent(parents[v]);
}
void join(int a, int b) {
  int x = find_parent(a);
  int y = find_parent(b);
  if (x != y) {
    parents[a] = b;
  }
}
bool check_list(int v, vector<int> nodes[]) { return nodes[v].empty(); }
void dfs(int v, vector<int> nodes[]) {
  int counter = 0;
  if (nodes[v].empty()) {
    return;
  }
  for (int i = 0; i < nodes[v].size(); ++i) {
    if (check_list(nodes[v][i], nodes)) ++counter;
  }
  if (counter < 3) {
    cout << "No";
    exit(0);
  }
  for (int i = 0; i < nodes[v].size(); ++i) dfs(nodes[v][i], nodes);
}
void fill(char arr[9][9]) {
  for (int i = 0; i < 9; ++i) {
    for (int j = 0; j < 9; ++j) {
      if (arr[i][j] == '.') arr[i][j] = '!';
    }
  }
}
int main() {
  char arr[9][9];
  for (int i = 0; i < 9; ++i) {
    for (int j = 0; j < 9; ++j) {
      char x;
      cin >> x;
      if (x == ' ') cin >> x;
      arr[i][j] = x;
    }
  }
  int x, y;
  cin >> x >> y;
  --x;
  --y;
  x %= 3;
  y %= 3;
  int purpose = x * 3 + y + 1;
  if (purpose == 1) {
    bool flag = false;
    if (arr[0][0] == '.') {
      flag = true;
      arr[0][0] = '!';
    }
    if (arr[0][1] == '.') {
      flag = true;
      arr[0][1] = '!';
    }
    if (arr[0][2] == '.') {
      flag = true;
      arr[0][2] = '!';
    }
    if (arr[1][0] == '.') {
      flag = true;
      arr[1][0] = '!';
    }
    if (arr[1][1] == '.') {
      flag = true;
      arr[1][1] = '!';
    }
    if (arr[1][2] == '.') {
      flag = true;
      arr[1][2] = '!';
    }
    if (arr[2][0] == '.') {
      flag = true;
      arr[2][0] = '!';
    }
    if (arr[2][1] == '.') {
      flag = true;
      arr[2][1] = '!';
    }
    if (arr[2][2] == '.') {
      flag = true;
      arr[2][2] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 2) {
    bool flag = false;
    if (arr[0][3] == '.') {
      flag = true;
      arr[0][3] = '!';
    }
    if (arr[0][4] == '.') {
      flag = true;
      arr[0][4] = '!';
    }
    if (arr[0][5] == '.') {
      flag = true;
      arr[0][5] = '!';
    }
    if (arr[1][3] == '.') {
      flag = true;
      arr[1][3] = '!';
    }
    if (arr[1][4] == '.') {
      flag = true;
      arr[1][4] = '!';
    }
    if (arr[1][5] == '.') {
      flag = true;
      arr[1][5] = '!';
    }
    if (arr[2][3] == '.') {
      flag = true;
      arr[2][3] = '!';
    }
    if (arr[2][4] == '.') {
      flag = true;
      arr[2][4] = '!';
    }
    if (arr[2][5] == '.') {
      flag = true;
      arr[2][5] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 3) {
    bool flag = false;
    if (arr[0][6] == '.') {
      flag = true;
      arr[0][6] = '!';
    }
    if (arr[0][7] == '.') {
      flag = true;
      arr[0][7] = '!';
    }
    if (arr[0][8] == '.') {
      flag = true;
      arr[0][8] = '!';
    }
    if (arr[1][6] == '.') {
      flag = true;
      arr[1][6] = '!';
    }
    if (arr[1][7] == '.') {
      flag = true;
      arr[1][7] = '!';
    }
    if (arr[1][8] == '.') {
      flag = true;
      arr[1][8] = '!';
    }
    if (arr[2][6] == '.') {
      flag = true;
      arr[2][6] = '!';
    }
    if (arr[2][7] == '.') {
      flag = true;
      arr[2][7] = '!';
    }
    if (arr[2][8] == '.') {
      flag = true;
      arr[2][8] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 4) {
    bool flag = false;
    if (arr[3][0] == '.') {
      flag = true;
      arr[3][0] = '!';
    }
    if (arr[3][1] == '.') {
      flag = true;
      arr[3][1] = '!';
    }
    if (arr[3][2] == '.') {
      flag = true;
      arr[3][2] = '!';
    }
    if (arr[4][0] == '.') {
      flag = true;
      arr[4][0] = '!';
    }
    if (arr[4][1] == '.') {
      flag = true;
      arr[4][1] = '!';
    }
    if (arr[4][2] == '.') {
      flag = true;
      arr[4][2] = '!';
    }
    if (arr[5][0] == '.') {
      flag = true;
      arr[5][0] = '!';
    }
    if (arr[5][1] == '.') {
      flag = true;
      arr[5][1] = '!';
    }
    if (arr[5][2] == '.') {
      flag = true;
      arr[5][2] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 5) {
    bool flag = false;
    if (arr[3][3] == '.') {
      flag = true;
      arr[3][3] = '!';
    }
    if (arr[3][4] == '.') {
      flag = true;
      arr[3][4] = '!';
    }
    if (arr[3][5] == '.') {
      flag = true;
      arr[3][5] = '!';
    }
    if (arr[4][3] == '.') {
      flag = true;
      arr[4][3] = '!';
    }
    if (arr[4][4] == '.') {
      flag = true;
      arr[4][4] = '!';
    }
    if (arr[4][5] == '.') {
      flag = true;
      arr[4][5] = '!';
    }
    if (arr[5][3] == '.') {
      flag = true;
      arr[5][3] = '!';
    }
    if (arr[5][4] == '.') {
      flag = true;
      arr[5][4] = '!';
    }
    if (arr[5][5] == '.') {
      flag = true;
      arr[5][5] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 6) {
    bool flag = false;
    if (arr[3][6] == '.') {
      flag = true;
      arr[3][6] = '!';
    }
    if (arr[3][7] == '.') {
      flag = true;
      arr[3][7] = '!';
    }
    if (arr[3][8] == '.') {
      flag = true;
      arr[3][8] = '!';
    }
    if (arr[4][6] == '.') {
      flag = true;
      arr[4][6] = '!';
    }
    if (arr[4][7] == '.') {
      flag = true;
      arr[4][7] = '!';
    }
    if (arr[4][8] == '.') {
      flag = true;
      arr[4][8] = '!';
    }
    if (arr[5][6] == '.') {
      flag = true;
      arr[5][6] = '!';
    }
    if (arr[5][7] == '.') {
      flag = true;
      arr[5][7] = '!';
    }
    if (arr[5][8] == '.') {
      flag = true;
      arr[5][8] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 7) {
    bool flag = false;
    if (arr[6][0] == '.') {
      flag = true;
      arr[6][0] = '!';
    }
    if (arr[6][1] == '.') {
      flag = true;
      arr[6][1] = '!';
    }
    if (arr[6][2] == '.') {
      flag = true;
      arr[6][2] = '!';
    }
    if (arr[7][0] == '.') {
      flag = true;
      arr[7][0] = '!';
    }
    if (arr[7][1] == '.') {
      flag = true;
      arr[7][1] = '!';
    }
    if (arr[7][2] == '.') {
      flag = true;
      arr[7][2] = '!';
    }
    if (arr[8][0] == '.') {
      flag = true;
      arr[8][0] = '!';
    }
    if (arr[8][1] == '.') {
      flag = true;
      arr[8][1] = '!';
    }
    if (arr[8][2] == '.') {
      flag = true;
      arr[8][2] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 8) {
    bool flag = false;
    if (arr[6][3] == '.') {
      flag = true;
      arr[6][3] = '!';
    }
    if (arr[6][4] == '.') {
      flag = true;
      arr[6][4] = '!';
    }
    if (arr[6][5] == '.') {
      flag = true;
      arr[6][5] = '!';
    }
    if (arr[7][3] == '.') {
      flag = true;
      arr[7][3] = '!';
    }
    if (arr[7][4] == '.') {
      flag = true;
      arr[7][4] = '!';
    }
    if (arr[7][5] == '.') {
      flag = true;
      arr[7][5] = '!';
    }
    if (arr[8][3] == '.') {
      flag = true;
      arr[8][3] = '!';
    }
    if (arr[8][4] == '.') {
      flag = true;
      arr[8][4] = '!';
    }
    if (arr[8][5] == '.') {
      flag = true;
      arr[8][5] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  if (purpose == 9) {
    bool flag = false;
    if (arr[6][6] == '.') {
      flag = true;
      arr[6][6] = '!';
    }
    if (arr[6][7] == '.') {
      flag = true;
      arr[6][7] = '!';
    }
    if (arr[6][8] == '.') {
      flag = true;
      arr[6][8] = '!';
    }
    if (arr[7][6] == '.') {
      flag = true;
      arr[7][6] = '!';
    }
    if (arr[7][7] == '.') {
      flag = true;
      arr[7][7] = '!';
    }
    if (arr[7][8] == '.') {
      flag = true;
      arr[7][8] = '!';
    }
    if (arr[8][6] == '.') {
      flag = true;
      arr[8][6] = '!';
    }
    if (arr[8][7] == '.') {
      flag = true;
      arr[8][7] = '!';
    }
    if (arr[8][8] == '.') {
      flag = true;
      arr[8][8] = '!';
    }
    if (!flag) {
      fill(arr);
    }
  }
  for (int i = 0; i < 9; ++i) {
    for (int j = 0; j < 9; ++j) {
      cout << arr[i][j];
      if (j % 3 == 2) cout << ' ';
    }
    cout << '\n';
    if (i % 3 == 2) cout << '\n';
  }
}