You are given a matrix board of size n*m, containing either 'X' or 'O' in each cell.
'X' represents cells you own, and 'O' represents those you don't.
You can capture regions that are surrounded by 'X' in all directions by turning each of their cells from 'O' to 'X'.
Note: Two cells are connected if they share a common edge.
You have to return the board configuration after you have captured as many cells as you can.
The first line contains an integer âTâ denoting the number of test cases.
For each test case the input has the following lines:
For each test case, the output has n lines, each containing m space-separated characters denoting the final state of the board.
2
4 5
X X X X X
X X O O X
X O X O X
X O X X X
3 3
X X X
X O X
X X X
X X X X X
X X X X X
X O X X X
X O X X X
X X X
X X X
X X X
1 <= T <= 10
1 <= n, m <= 200
boardij = 'X' or 'O'