The drawing is specified as a
A matrix, in which the
A[y][x] element defines the color of the pixel at the intersection of the
y row and the
column x. Recolor to
2 a one-color area starting at pixel
(x0,y0).
Input
The first line specifies the size of the
n square matrix (
\(0<n<10\)). The second line contains the coordinates of the point
(x0, y0) - two numbers separated by a space. Followed by
n lines of
n numbers in each line space (each number is not greater than 10).
Imprint
Output the resulting matrix after recoloring.
Examples
| # |
Input |
Output |
| 1 |
5
1 2
0 1 0 1 1
1 1 1 2 2
0 1 0 2 2
3 3 1 2 2
0 1 1 0 0
| 0 2 0 1 1
2 2 2 2 2
0 2 0 2 2
3 3 1 2 2
0 1 1 0 0
|