There is an image with a height of H pixels and a width of W pixels. Each of the pixels is represented by either `.` or `*`. The character representing the pixel at the i-th row from the top and the j-th column from the left, is denoted by C_{i,j}.  Extend this image vertically so that its height is doubled. That is, print a image with a height of 2H pixels and a width of W pixels where the pixel at the i-th row and j-th column is equal to C_{(i+1)/2,j} (the result of division is rounded down).
h,w=map(int, input().split())
image=[]
for i in range(h):
  image.append(input())
newimage=[]
for i in range(h):
  newimage.append(image[i])
  newimage.append(image[i])
for i in range(2*h-1):
  print(newimage[i])
  
h,w=map(int, input().split())
image=[]
for i in range(h):
  image.append(input())
newimage=[]
for i in range(h):
  newimage.append(image[i])
  newimage.append(image[i])
for i in range(2*h):
  print(newimage[i]) 