#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++)
			cin>>shop[i][j];
 
	for(int i=0; i<h; i++)
	{
		for(int j=0; j<w; j++)
			cout<<shop[i][j];
		cout<<"\n";
	}
 
	return 0;
}