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;
long long i, j, k, x_gcd = 0, y_gcd, Gcd = 0;
vector<bool> prime(1000001, true);
list<pair<long long, long long> >::iterator i_lp;
list<long long>::iterator i_ls;
vector<long long>::iterator i_v;
vector<long long> spf(1000001);
string binary;
string conv_bin(long long n) {
  if (n / 2 != 0) {
    conv_bin(n / 2);
  }
  return binary += char(48 + n % 2);
}
inline int digsum(long long n) {
  int sum = 0;
  n = abs(n);
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
inline void fastsc(long long &x) {
  register long long c = getchar();
  x = 0;
  bool neg = 0;
  for (; ((c < 48 || c > 57) && c != '-'); c = getchar())
    ;
  if (c == '-') {
    neg = 1;
    c = getchar();
  }
  for (; c > 47 && c < 58; c = getchar()) {
    x = (x * 10) + (c - 48);
  }
  if (neg) x = -x;
}
inline bool ispalin(string s) {
  for (int i = 0, j = s.size() - 1; i <= j; i++, j--)
    if (s[i] != s[j]) return false;
  return true;
}
bool ispow2(long long x) { return x && (!(x & (x - 1))); }
void inline extend_gcd(long long a, long long b) {
  if (b == 0) {
    Gcd = a;
    x_gcd = 1;
    y_gcd = 0;
  } else {
    extend_gcd(b, a % b);
    long long temp = x_gcd;
    x_gcd = y_gcd;
    y_gcd = temp - (a / b) * y_gcd;
  }
}
inline long long b_Search(vector<long long> arr, long long l, long long r,
                          long long x) {
  if (r >= l) {
    long long mid = l + (r - l) / 2;
    if (arr[mid] == x) return mid;
    if (arr[mid] > x) return b_Search(arr, l, mid - 1, x);
    return b_Search(arr, mid + 1, r, x);
  }
  return -1;
}
inline long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
inline long long is_prime(long long n) {
  for (long long i = 2; i <= sqrt(n); i++) {
    if (n % i == 0) return 0;
  }
  return 1;
}
inline void Sieve_p(long long n) {
  for (long long p = 2; p * p <= n; p++) {
    if (prime[p] == true) {
      for (long long i = p * 2; i <= n; i += p) prime[i] = false;
    }
  }
}
inline void sieve_f() {
  spf[1] = 1;
  for (long long i = 2; i < 1000001; i++) spf[i] = i;
  for (long long i = 4; i < 1000001; i += 2) spf[i] = 2;
  for (long long i = 3; i * i < 1000001; i++) {
    if (spf[i] == i) {
      for (long long j = i * i; j < 1000001; j += i)
        if (spf[j] == j) spf[j] = i;
    }
  }
}
inline long long pwr(long long x, long long y) {
  long long temp;
  if (y == 0) return 1;
  temp = pwr(x, y / 2);
  if (y % 2 == 0)
    return temp * temp;
  else
    return x * temp * temp;
}
inline int pwr_mod(long long x, long long y, long long p) {
  long long res = 1;
  x = x % p;
  while (y > 0) {
    if (y & 1) res = (res * x) % p;
    y = y >> 1;
    x = (x * x) % p;
  }
  return res;
}
inline long long s_int(string a) {
  long long p = 0;
  for (i = 0; i < a.size(); i++) {
    p += (a[i] - 48);
    if (i != a.size() - 1) p = p * 10;
  }
  return p;
}
long long mod_inv_p(long long n, long long m) { return pwr_mod(n, m - 2, m); }
long long mod_inv(long long A, long long M) {
  extend_gcd(A, M);
  return (x_gcd % M + M) % M;
}
struct pp {
  string s[3];
};
pp a[50][50];
int main() {
  string pp;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      for (k = 0; k < 3; k++) {
        cin >> pp;
        a[i][k].s[j] = pp;
      }
    }
  }
  long long u, v;
  cin >> u >> v;
  long long p;
  long long o;
  p = u / 3;
  if (u % 3 != 0) p++;
  o = v / 3;
  if (v % 3 != 0) o++;
  long long r = 3 - (p * 3 - u) - 1;
  long long w = 3 - (o * 3 - v) - 1;
  long long l = 0;
  long long z = 0;
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      if (a[r][w].s[i][j] == '.') z = 1;
    }
  }
  if (z == 1) {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        if (a[r][w].s[i][j] == '.') a[r][w].s[i][j] = '!';
      }
    }
  } else {
    for (i = 0; i < 3; i++) {
      for (j = 0; j < 3; j++) {
        for (k = 0; k < 3; k++) {
          for (l = 0; l < 3; l++) {
            if (a[i][j].s[k][l] == '.') a[i][j].s[k][l] = '!';
          }
        }
      }
    }
  }
  for (i = 0; i < 3; i++) {
    for (j = 0; j < 3; j++) {
      for (k = 0; k < 3; k++) {
        cout << a[i][k].s[j] << " ";
      }
      cout << endl;
    }
    cout << endl;
  }
  return 0;
}