#include<cstdio>
#include<iostream>
using namespace std;

int main()
{
	int w, h;

	scanf("%d %d", &w, &h);

	char shop[h][w];
	for(int i=0; i<h; i++)
		for(int j=0; j<w; j++)
			scanf("%c", &shop[i][j]);

	for(int i=0; i<h; i++)
	{
		for(int j=0; j<w; j++)
			printf("%c", shop[i][j]);
			//cout<<shop[i][j];
		printf("\n");
		//cout<<"\n";
	}

	return 0;
}