Colorful Table
You are given a table of size , consisting of symbols "R
", "G
", "B
".
Also, given are integers () and , where is the number of different symbols that can appear in the table. If equals , only the symbols "R
" and "G
" are available; if equals , the symbols "R
", "G
", "B
" are available.
You need to change the values of at most elements of the table so that there are no pairs of neighboring cells with the same value. Note that if , using the symbol "B
" when changing the values of the table cells is prohibited.
It is guaranteed that under the given constraints, there is a way to change the values of at most elements of the table so that there are no pairs of neighboring cells with the same value.
Note that there are no additional constraints in the problem.
Input
The first line contains two integers and () — the number of rows and columns of the table respectively.
The second line contains two integers () and , representing the number of available symbols and the number of allowed changes in the table, respectively.
The next lines contain symbols each — the elements of the table . If , then "R
", "G
". If , then "R
", "G
", "B
".
Output
Output lines of symbols each, describing the table after the changes.
If there are multiple correct answers, any of them is allowed.
Examples
Scoring
( points): ;
( points): ;
( points): ;
( points): all rows of table are the same, (for ), , ;
( points): all rows of table are the same, , ;
( points): ;
( points): ;
( points): ;
( points): .