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;
}
相关推荐
北冥you鱼28 分钟前
Go语言与默克尔树:区块链数据完整性的基石
开发语言·golang·区块链
库克克38 分钟前
【C++】类和对象--this指针详解
java·开发语言·c++
薄情书生39 分钟前
基于51单片机的电子钟设计(LCD12864显示 + DS1302)
c语言·51单片机·protues
JackieZhengChina1 小时前
image-viewer-js 开源图片查看插件完整教程
开发语言·javascript·开源
光影少年1 小时前
react的View/Text/Image/ScrollView 常用组件注意事项
开发语言·前端·javascript·react.js·前端框架
半条-咸鱼1 小时前
【FreeRTOS】核心原理与实战速查手册
c语言·操作系统·rtos
白帽小阳1 小时前
Typora插件开发指南:打造专属IDE式写作环境
c语言·网络·python·网络安全·github·pygame·护网行动
库克克2 小时前
【C++】类和对象--类对象模型与大小计算
开发语言·jvm·c++
布朗克1682 小时前
Go 入门到精通-15-错误处理
开发语言·python·golang·错误处理
zzb15802 小时前
Zed 配置 Swift / iOS 开发
开发语言·ios·swift