(RankList for this Question)
You are provided with a grid of dots arranged in an 8x8 format. Within this grid, a word comprised of lowercase Latin letters is vertically written in a single column, going from the top to the bottom of the grid. Your task is to determine and extract this word from each given grid.
Constraints
Input Format
The input consists of multiple test cases. The first line contains a single integer, 't', which represents the number of test cases. Each test case consists of 8 lines, each containing 8 characters. These characters can be either dots ('.') or lowercase Latin letters (a-z).
Output Format
For each test case, your program should output a single line containing the word that is formed by the lowercase Latin letters within the grid column, read from top to bottom.
Example 1
Input:
5
........
........
........
........
...i....
........
........
........
........
.l......
.o......
.s......
.t......
........
........
........
........
........
........
........
......t.
......h.
......e.
........
........
........
........
........
.......g
.......a
.......m
.......e
a.......
a.......
a.......
a.......
a.......
a.......
a.......
a.......
Output:
i
lost
the
game
aaaaaaaa
Explanation:
Example is self-explanatory.
Log In to solve the Question