#P1850C. Word on the Paper

Word on the Paper

题面翻译

【题目描述】

给你一个 8×88×8 的方格,这个方阵由小写字母. 组成,这些小写字母排成了竖列,它们是一个字符串,请你横向输出这个字符串。

【输入格式】

本题由多组测试用例构成,第一行是一个整数 tt1t10001 \le t \le 1000),表示测试用例数量。

每个用例包含8行8列,即 8×88×8 的方格(方格意义见“题目描述”)。输入是连续的,从头至尾没有间隙。

【输出格式】

tt 行,每组测试用例占一行,每行包含一个字符串。

题目描述

On an 8×8 8 \times 8 grid of dots, a word consisting of lowercase Latin letters is written vertically in one column, from top to bottom. What is it?

输入格式

The input consists of multiple test cases. The first line of the input contains a single integer t t ( 1t1000 1 \leq t \leq 1000 ) — the number of test cases.

Each test case consists of 8 8 lines, each containing 8 8 characters. Each character in the grid is either . \texttt{.} (representing a dot) or a lowercase Latin letter ( a \texttt{a} z \texttt{z} ).

The word lies entirely in a single column and is continuous from the beginning to the ending (without gaps). See the sample input for better understanding.

输出格式

For each test case, output a single line containing the word made up of lowercase Latin letters ( a \texttt{a} z \texttt{z} ) that is written vertically in one column from top to bottom.

样例 #1

样例输入 #1

5
........
........
........
........
...i....
........
........
........
........
.l......
.o......
.s......
.t......
........
........
........
........
........
........
........
......t.
......h.
......e.
........
........
........
........
........
.......g
.......a
.......m
.......e
a.......
a.......
a.......
a.......
a.......
a.......
a.......
a.......

样例输出 #1

i
lost
the
game
aaaaaaaa