#codeforcesP2009B. osu!mania
osu!mania
Problem
You are playing your favorite rhythm game, osu!mania. The layout of your beatmap consists of rows and columns. Because notes at the bottom are closer, you will process the bottommost row first and the topmost row last. Each row will contain exactly one note, represented as a '#'.
For each note in the order of processing, output the column in which the note appears.
Input
The first line contains — the number of test cases.
For each test case, the first line contains — the number of rows of the beatmap.
The following lines contain characters. The -th line represents the -th row of the beatmap from the top. It is guaranteed that the characters are either '.' or '#', and exactly one of the characters is '#'.
Output
For each test case, output integers on a new line, the column that the -th note appears in for all from to
Example : in
3
4
#...
.#..
..#.
...#
2
.#..
.#..
1
...#
Example : out
4 3 2 1
2 2
4
相关
在下列比赛中: