You are given a 2D array with ~n~ rows and ~m~ columns and asked to run the following procedure on it 100 times.
function(grid): for each row in the grid going from top to bottom: for each column in the grid going from left to right: if the character in the given row and given column is an 'o' and the character in the same column and one row lower is an '.': swap those two characters in the grid
Print out the grid after running the procedure 100 times.
~1 \le n, m \le 50~
In the array, the only characters that will appear are
The first line contains two space-separated integers, ~n~ and ~m~.
Each of the next ~n~ lines contains ~m~ characters describing the array from top to bottom.
Print the grid in exactly the same format after 100 simulations of the above procedure.
3 3 ooo #.. ..#
o.. #.o .o#