Presently the proprietor needs to eliminate a few (perhaps zero) sunflowers to arrive at the accompanying two objectives: At the point when you are on an unfilled cell, you can stroll to some other void cell. As such, those unfilled cells are associated. There is actually one straightforward way between any
Correct answer will be upvoted else downvoted. Computer science.
Presently the proprietor needs to eliminate a few (perhaps zero) sunflowers to arrive at the accompanying two objectives:
At the point when you are on an unfilled cell, you can stroll to some other void cell. As such, those unfilled cells are associated.
There is actually one straightforward way between any two void cells. All in all, there is no cycle among the unfilled cells.
You can stroll from an unfilled cell to another in the event that they share a typical edge.
Could you if it's not too much trouble, give the proprietor an answer that meets every one of her necessities?
Note that you are not permitted to establish sunflowers. You don't have to limit the number of sunflowers you eliminate. It tends to be shown that the appropriate response consistently exists.
Input
The input comprises of different experiments. The main line contains a solitary integer t (1≤t≤104) — the number of experiments. The portrayal of the experiments follows.
The primary line contains two integers n, m (1≤n,m≤500) — the number of lines and segments.
Every one of the following n lines contains m characters. Each character is either 'X' or '.', addressing a vacant cell and a cell that grows a sunflower, separately.
It is ensured that the amount of n⋅m for all experiments doesn't surpass 250000.
Output
For each experiment, print n lines. Each ought to contain m characters, addressing one line of the table. Each character ought to be either 'X' or '.', addressing an unfilled cell and a cell with a sunflower, individually.
In case there are numerous replies, you can print any. It very well may be shown that the appropriate response consistently exists.
![](/static/compass_v2/shared-icons/check-mark.png)
Step by step
Solved in 3 steps with 1 images
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)