CF1850C.Word on the Paper

普及/提高-

通过率:0%

AC君温馨提醒

该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。

题目描述

On an 8×88 \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 tt ( 1t10001 \leq t \leq 1000 ) — the number of test cases.

Each test case consists of 88 lines, each containing 88 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

    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
首页