C. Word on the Paper

time limit per test

1 second

memory limit per test

256 megabytes

input

standard input

output

standard output

On an 8×88×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≤10001≤�≤1000) --- the number of test cases.

Each test case consists of 88 lines, each containing 88 characters. Each character in the grid is either .. (representing a dot) or a lowercase Latin letter (aa--zz).

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 (aa--zz) that is written vertically in one column from top to bottom.

Example

input

Copy

复制代码

5

........

........

........

........

...i....

........

........

........

........

.l......

.o......

.s......

.t......

........

........

........

........

........

........

........

......t.

......h.

......e.

........

........

........

........

........

.......g

.......a

.......m

.......e

a.......

a.......

a.......

a.......

a.......

a.......

a.......

a.......

output

Copy

复制代码
i
lost
the
game
aaaaaaaa

解题说明:水题,直接遍历输出字母即可。

cpp 复制代码
#include<stdio.h>

int main()
{
	int t;
	scanf("%d", &t);
	for (t; t > 0; t--)
	{
		char a[72];
		for (int i = 0; i < 72; i++)
		{
			scanf("%c", &a[i]);
		}
		for (int i = 0; i < 72; i++)
		{
			if (a[i] >= 'a' && a[i] <= 'z')
			{
				printf("%c", a[i]);
			}
		}
		printf("\n");
	}
	return 0;
}
相关推荐
code bean1 小时前
【C#】获取不重复的编码(递增,非GUID)
开发语言·c#
阿里嘎多哈基米1 小时前
二、JVM 入门——(三)栈
java·开发语言·jvm·线程·
雷达学弱狗2 小时前
anaconda本身有一个python环境(base),想用别的环境就是用anaconda命令行往anaconda里创建虚拟环境
开发语言·python
燃尽余火2 小时前
Knife4j 文档展示异常的小坑
java·开发语言·spring
j_xxx404_3 小时前
数据结构:单链表的应用(力扣算法题)第一章
c语言·数据结构·算法·leetcode
爬虫程序猿3 小时前
利用 Java 爬虫按关键字搜索 1688 商品详情 API 返回值说明实战指南
java·开发语言·爬虫
Bling_Bling_13 小时前
ES6新语法特性(第二篇)
开发语言·前端·es6
乘风归趣3 小时前
spire.doc在word中生成公式
java·开发语言·word
土拨鼠不是老鼠3 小时前
windows 下 使用C++ 集成 zenoh
开发语言·c++
smilejingwei4 小时前
数据分析编程第五步:数据准备与整理
大数据·开发语言·数据分析·esprocspl