An R × C board is standing upright. Each cell is either empty . or blocked by a wall X. Several stones are dropped one by one. Each stone starts at the top cell of the specified column, and the input guarantees that this starting cell is empty.
A stone repeats the following rules until it stops.
Cells outside the board are not considered empty. The next stone is dropped only after the current stone has completely stopped. Print the board after all stones have been dropped.
The first line contains the board size R and C. (1 ≤ R ≤ 30,000, 1 ≤ C ≤ 30)
The next R lines describe the initial board. Each line is a string of length C; . means an empty cell and X means a wall.
The next line contains N, the number of stones to drop. (1 ≤ N ≤ 100,000)
The next N lines contain the column numbers where stones are dropped, in order. The leftmost column is numbered 1.
Print the final board from top to bottom in R lines. Cells occupied by stones must be printed as O.