欢迎光临散文网 会员登陆 & 注册

CF 1850C - Word on the Paper

2023-08-11 13:17 作者:您是打尖儿还是住店呢  | 我要投稿

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


Input

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


Each test case consists of 8 lines, each containing 8 characters. Each character in the grid is either .

 (representing a dot) or a lowercase Latin letter (a–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.


Output

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

-------------------------------------------------------------

在 8×8 的点阵上,由小写拉丁字母组成的单词从上到下垂直写在一列中。 它是什么?


输入

输入由多个测试用例组成。 输入的第一行包含一个整数 t (1≤t≤1000) — 测试用例的数量。


每个测试用例由 8 行组成,每行包含 8 个字符。 网格中的每个字符都是 .

  (代表点)或小写拉丁字母 (a–z)。


该单词完全位于单列中,并且从开头到结尾是连续的(没有间隙)。 请参阅示例输入以更好地理解。


输出

对于每个测试用例,输出一行,其中包含由小写拉丁字母 (a–z) 组成的单词,该单词从上到下垂直写在一列中。

----------------------------------------

代码:


CF 1850C - Word on the Paper的评论 (共 条)

分享到微博请遵守国家法律