Problem:
 Score : 200 points    Problem Statement 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).      Constraints  1≦H, W≦100  C_{i,j} is either . or * .         Input The input is given from Standard Input in the following format:  H  W  C_{1,1}...C_{1,W} : C_{H,1}...C_{H,W}       Output Print the extended image.        Sample Input 1 2 2
*.
.*      Sample Output 1 *.
*.
.*
.*       Sample Input 2 1 4
***.      Sample Output 2 ***.
***.       Sample Input 3 9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**.........      Sample Output 3 .....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*..*.*.......
.......*..*.*.......
........**.*........
........**.*........
.........**.........
.........**.........

Solution (Python):
H,W = map(int,input().split())

c = [list(input()) for x in range(H)]

for i in range(H):
    print("".join(c[i]))
    print("".join(c[i]))

Solution (Python):
h,w = map(int, input().split())

for i in range(h):
    s = input()
    print(s)
    print(s)

Solution (Python):
"""
N = list(map(int,input().split()))
S = [str(input()) for _ in range(N)]
S = [list(map(int,list(input()))) for _ in range(h)] 
print(*S,sep="")
"""

import sys
sys.setrecursionlimit(10**6)
input = lambda: sys.stdin.readline().rstrip()
inf = float("inf") 

h,w = map(int,input().split())
for _ in range(h):
    temp = input()
    for __ in range(2):
        print(temp)

Solution (Python):
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for i in range(1, 2 * H + 1):
    for j in range(1, W + 1):
        print(C[((i + 1) // 2) - 1][j - 1], end='')
    print()

Solution (Python):
H,W = map(int,input().split())
C = [list(map(str,input().split())) for _ in range(H)]
for hw in C:
    print(*hw)
    print(*hw)

Solution (Python):
h,w=map(int,input().split())

a=[]
for i in range(h):
  b=input()
  a.append(b)
  a.append(b)
for i in range(2*h):
  print(a[i])

Solution (Python):
h,w=map(int,input().split())
c=[list(input().split()) for _ in range(h)]
a=[]
for i in range(h):
	a.append(c[i])
	a.append(c[i])
for j in a:
	print(*j)

Solution (Python):
h, w = map(int, input().split())
arr = [''] * h
for i in range(h):
  arr[i] = input()
for e in arr:
  print(e)
  print(e)

Solution (Python):
H, W = list(map(int, input().split()))
for _ in range(H):
    c = input()
    print(c)
    print(c)

Solution (Python):
import sys
import math
def I():return int(sys.stdin.readline().replace("\n",""))
def I2():return map(int,sys.stdin.readline().replace("\n","").split())
def S():return str(sys.stdin.readline().replace("\n",""))
def L():return list(sys.stdin.readline().replace("\n",""))
def Intl():return [int(k) for k in sys.stdin.readline().replace("\n","").split()]
def Lx(k):return list(map(lambda x:int(x)*-k,sys.stdin.readline().replace("\n","").split()))

h, w = I2()
c = [S() for _ in range(h)]

for i in range(2*h):
    print(c[i//2])

Solution (Python):
h,w=map(int,input().split())
for i in range(h):
    c=input()
    for i in range(2):
        print(c)

Solution (Python):
H,W = map(int,input().split())

for i in range(H):
	C = input()
	print(C)
	print(C)

Solution (Python):
h, w = map(int, input().split())
c = [input() for _ in range(h)]

for i in range(h):
    print(c[i])
    print(c[i])

Solution (Python):
h, w = map(int, input().split())
ans = list()
for a in range(h):
    c = input()
    ans.append(c)
    ans.append(c)

for a in range(h*2):
    print(ans[a])

Solution (Python):
n, m = map(int, input().split())
for i in range(n):
    x = input()
    for j in range(2):
        print(x)

Solution (Python):
h,w=map(int,input().split())
for i in range(h):
    c=input()
    print(c)
    print(c)

Solution (Python):
H, W = map(int, input().split())
mp = [input() for i in range(H)]

for i in range(H):
    print(mp[i])
    print(mp[i])

Solution (Python):
h, w = map(int, input().split())
for _ in range(h):
    s = input()
    for i in range(2):
        print(s)

Solution (Python):
h, w = map(int, input().split())
for _ in range(h):
    s = input()
    print(s)
    print(s)

Solution (Python):
H,W=map(int,input().split())
for i in range(H):
  s=input()
  print(s)
  print(s)

Solution (Python):
px = list(map(int, input().split()))
pxs = [input() for i in range(px[0])]
for i in pxs:
  print(i)
  print(i)

Solution (Python):
h,w=map(int,input().split())
ans=[]
for i in range(h):
  temp=list(map(str,input()))
  ans.append(temp)
  ans.append(temp)
for i in range(h*2):
  print("".join(ans[i]))

Solution (Python):
h, w = map(int, input().split())
for _ in range(h):
    c = [x for x in input().split()]
    print(''.join(c))
    print(''.join(c))

Solution (Python):
H,W=map(int,input().split())
S=[input() for i in range(H)]
for i in range(H):
    print(S[i])
    print(S[i])

Solution (Python):
H, W = map(int, input().split())
C = []
for _ in range(H):
    C.append(list(input()))

D = []
for i in range(2*H):
    D.append(C[i//2])
    print(''.join(D[i]))

Solution (Python):
h, w = map(int, input().split())
c = []
for _ in range(h):
    c.append(input())

for index in c:
    print(index)
    print(index)

Solution (Python):
h, w = map(int, input().split())
c = [list(input()) for _ in range(h)]

ans = [[''] * w for _ in range(2 * h)]

for i in range(2 * h):
    for j in range(w):
        ans[i][j] = c[i // 2][j]

for line in ans:
    print(''.join(line))

Solution (Python):
h, w = map(int, input().split())
c = [list(input()) for _ in range(h)]

ans = [[''] * w for _ in range(2 * h)]

for i in range(2 * h):
    for j in range(w):
        ans[i][j] = c[i // 2][j]

for line in ans:
    print(''.join(line))

Solution (Python):
H, W = map(int, input().split())
h = []* 2* H

for i in range(H):
  str_array = input()
  h.append(str_array)
  h.append(str_array)

for i in range(2* H):
  print(h[i])

Solution (Python):
H, W = map(int, input().split())
shape = [input() for _ in range(H)]
for i in range(H):
    print(shape[i])
    print(shape[i])

Solution (Python):
h, w = map(int, input().split())
for i in range(h):
    c = input()
    print('{}\n{}'.format(c, c))

Solution (Python):
h, w = map(int, input().split())
c = []
for i in range(h):
    c.append(input())
    print('{}\n{}'.format(c[i], c[i]))

Solution (Python):
H,W = map(int,input().split())
C = []
for _ in range(H):
    C.append(input())

ans = []
for c in C:
    for _ in range(2):
        ans.append(c)

for a in ans:
    print(a)

Solution (Python):
def main():
    H, W = map(int, input().split())
    C = [input() for _ in range(H)]

    for c in C:
        print(c)
        print(c)


if __name__ == "__main__":
    main()

Solution (Python):
h, w = map(int, input().split())
for i in range(h):
	s = input()
	print(s)
	print(s)

Solution (Python):
h,w = map(int,input().split())
picture = []
for i in range(h):
    c = list(input())
    picture.append(c)
    picture.append(c)

for j in range(2*h):
    print("".join(picture[j]))

Solution (Python):
H, W = input().strip().split()
H, W = [int(H), int(W)]

data_list = []

for i in range(H):
  l = input()
  data_list.append(l)
  data_list.append(l)
  
for i in data_list:
  print(i)

Solution (Python):
H, W = map(int, input().split())

output = []
for _ in range(H):
  S = input()
  output.append(S)
  output.append(S)

print(*output, sep='\n')

Solution (Python):
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for i in range(2*H):
  print(C[i//2])

Solution (Python):
H, _ = map(int, input().split())
C = [input() for _ in range(H)]
for c in C:
  print(c)
  print(c)

Solution (Python):

H, W = map(int, input().split())
for i in range(H):
    C = input()
    print(C)
    print(C)

Solution (Python):
H,W=map(int,input().split())
for i in range(H):
  n=input()
  print(n)
  print(n)

Solution (Python):
h,w = map(int,input().split())
c = [0]*h

for i in range(0,h):
  c[i] = input().split()


for i in range(0,h):
  print(''.join(c[i]))
  print(''.join(c[i]))

Solution (Python):
H,W = map(int, input().split())
C = [0 for _ in range(H)]

for i in range(H):
	C[i] = input()

for i in range(H):
	print(C[i])
	print(C[i])

Solution (Python):
h,w = map(int,input().split())
for i in range(h):
  s = input()
  print(s)
  print(s)

Solution (Python):
h, w = map(int, input().split())
c = []
for i in range(h):
    cc = input()
    c.append(cc)
    c.append(cc)

for i in range(h*2):
    print(c[i])

Solution (Python):
H,W = map(int,input().split())

for _ in range(H):
    c = input()
    print(c)
    print(c)

Solution (Python):
from math import *

def cin(): 
    return map(int,input().split())

def cins(): 
    return input.split()

def cino(test=False): 
    if not test:
        return int(input())
    else: 
        return input()

def cina(): 
  return list(map(int,input().split()))

def ssplit(): 
    return list(input().split())

def printlist(l): 
    for i in l:
        print(i,end=" ")

def main():
    a,b = cin()
    l = []
    for i in range(a):
        c = list(input())
        l.append(c)
    
    for i in range(2*a):
        for j in range(b):
            print(l[i//2][j],end="")
        print("")


if __name__ == '__main__':
    main()

Solution (Python):
h, w = map(int, input().split())

for i in range(h):
    c = input()
    print(c)
    print(c)

Solution (Python):
def inp():
    return(int(input()))



def inlist():
    return(list(map(int, input().split())))



def instr():
    s = input()
    return(list(s[:len(s)]))



def invr():
    return(map(int, input().split()))


H, W = invr()
C = []
for i in range(H):
    temp = instr()
    C.append(temp)

for i in range(2*H):
    temp = ""
    for j in range(W):
        temp += C[i//2][j]
    print(temp)

Solution (Python):
H,W = map(int,input().split())
for _ in range(H):
    a = input()
    print(a)
    print(a)

Solution (Python):
H,W = list(map(int,input().split()))
C = [input() for _ in range(H)]
for c in C:
    print(c)
    print(c)

Solution (Python):
h, w = map(int, input().split())

for i in range(h):
    c = input()
    print(c)
    print(c)

Solution (Python):
H, W = map(int, input().split())
for _ in range(H):
    s = input()
    print(s, flush=True)
    print(s, flush=True)

Solution (Python):
h, w = list(map(int, input().split()))
for _ in range(h):
    c = input()
    print(c)
    print(c)

Solution (Python):






import sys
input = sys.stdin.readline

import math

import bisect
from collections import defaultdict
from collections import deque
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def I(): return int(input().strip())
def S(): return input().strip()
def IL(): return list(map(int,input().split()))
def SL(): return list(map(str,input().split()))
def ILs(n): return list(int(input()) for _ in range(n))
def SLs(n): return list(input().strip() for _ in range(n))
def ILL(n): return [list(map(int, input().split())) for _ in range(n)]
def SLL(n): return [list(map(str, input().split())) for _ in range(n)]


def P(arg): print(arg); return
def Y(): print("Yes"); return
def N(): print("No"); return
def E(): exit()
def PE(arg): print(arg); exit()
def YE(): print("Yes"); exit()
def NE(): print("No"); exit()


def DD(arg): return defaultdict(arg)



def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
  arr = []
  temp = n
  for i in range(2, int(-(-n**0.5//1))+1):
    if temp%i==0:
      cnt=0
      while temp%i==0: 
        cnt+=1 
        temp //= i
      arr.append([i, cnt])
  if temp!=1:
    arr.append([temp, 1])
  if arr==[]:
    arr.append([n, 1])
  return arr


def make_divisors(n):
  divisors = []
  for i in range(1, int(n**0.5)+1):
    if n % i == 0:
      divisors.append(i)
      if i != n // i: 
        divisors.append(n//i)
  return divisors


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count


def base_10_to_n(X, n):
  if X//n:
    return base_10_to_n(X//n, n)+[X%n]
  return [X%n]

def base_n_to_10(X, n):
  return sum(int(str(X)[-i])*n**i for i in range(len(str(X))))


def int_log(n, a):
  count = 0
  while n>=a:
    n //= a
    count += 1
  return count





H,W = IL()

for _ in range(H):
  s = S()
  P(s)
  P(s)

Solution (Python):
h, w = map(int, input().split())
c = [input() for _ in range(h)]

for i in c:
    print(i)
    print(i)

Solution (Python):
h, w = list(map(int, input().split()))
c_list = [list(input()) for _ in range(h)]

for i in range(len(c_list) * 2):
    for j in range(len(c_list[0])):
        print(c_list[min((i) // 2, h - 1)][j], end="")
    print()

Solution (Python):
from sys import stdin
def S(): return stdin.readline().rstrip()
def LI(): return list(map(int,stdin.readline().rstrip().split()))

tmp = LI()
h,w = [tmp.pop(0) for i in range(2)]

c = []

for i in range(h):
    tmp = S()
    c.append(tmp)

for i in range(h):
    for k in range(2):
        print(c[i],end='')
        print()

Solution (Python):
h,w = map(int, input().split())
c = [ input() for i in range(h)]
for i in c:
    print(i)
    print(i)

Solution (Python):
h,w = map(int,input().split())
c = [[0]*w for i in range(h*2)]
for i in range(h):
    dum = list(input().split())
    print("".join(dum))
    print("".join(dum))

Solution (Python):


import sys






























def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    h, w = mi()
    for _ in range(h):
        s = input()
        print(s)
        print(s)


if __name__ == "__main__":
    main()

Solution (Python):
H, W  = map(int, input().split())
X = [list(input().split()) for i in range(H)]
for i in range(2*H):
  print(*X[int(i/2)])

Solution (Python):
H, W = map(int, input().split())
C = [None] * H
for i in range(H):
    C[i] = input()

for i in range(2 * H):
    print(C[int(i / 2)])

Solution (Python):
h, w = map(int, input().split())
for i in range(h):
    s = input()
    print(s)
    print(s)

Solution (Python):
H, W = map(int, input().split())

str_image = [input() for i in range(H)]

for line in str_image:
    print(line)
    print(line)

Solution (Python):
H, W = map(int, input().split())

for _ in range(H):
    C = input()
    print(C)
    print(C)

Solution (Python):
H,W = map(int, input().split())
C = []
for i in range(H):
    c = input()
    C.append(c)
    C.append(c)
for i in range(2*H):
    print(C[i])

Solution (Python):
H, W = map(int, input().split())
C = [[i for i in input()] for j in range(H)]

for i in range(1, 2*H+1):
    for j in range(1, W+1):
        print(C[(i+1)//2 - 1][j - 1], end="")
    print()

Solution (Python):
H,W=map(int,input().split())
for i in range(H):
  s=input()
  print(s)
  print(s)

Solution (Python):
def main():
    h, w = map(int, input().split())

    for i in range(h):
        s = input()
        print(s + '\n' + s + '\n')

main()

Solution (Python):
h,w = map(int,input().split())
for i in range(h):
    s = input()
    print(s + "\n" + s + "\n")

Solution (Python):
def main():
    h, w = map(int, input().split())
    c = list(list(input()) for i in range(h))

    for i in range(2*h):
        for j in range(w):
            print(c[int(i/2)][j], end='')
        print()

main()

Solution (Python):
h,w = map(int,input().split())
m = list(list(input()) for i in range(h))

portrait = []
for i in range(2*h):
    for j in range(w):
        print(m[int(i/2)][j], end='')
    print()

Solution (Python):

H, W = map(int, input().split())
for i in range(H):
    ln = input()
    print(ln)
    print(ln)

Solution (Python):
from sys import exit

ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))

h,w = mi()
cs = [input() for i in range(h)]

for i in range(h):
    for k in range(2):
        for j in range(w):
            print(cs[i][j],end="")
        print("")

Solution (Python):

import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

def main():
    H,W=map(int,input().split())
    for _ in range(H):
        C=input()
        print(C+'\n'+C)

if __name__ == '__main__':
    main()

Solution (Python):
h,m=map(int,input().split())
a=[input()for i in range(h)]
for i in a:
  print(i)
  print(i)

Solution (Python):
H, W = map(int, input().split())
hw = [input() for i in range(H)]
for i in hw:
    print(i)
    print(i)

Solution (Python):
H,W = map(int,input().split())
l=[]
for i in range(H):
    l.append(list(input()))
for i in range(H):
    for count in range(2):
        for j in range(W):
            if j==W-1:
                print(l[i][j])
            else:
                print(l[i][j],end='')

Solution (Python):
a,b=map(int,input().split())
for i in range(a):
    c=input()
    print(c)
    print(c)

Solution (Python):
H, W = map(int, input().split())

ans = []

for i in range(H):
    tmp = input()
    ans.append(tmp)
    ans.append(tmp)

print(*ans, sep="\n")

Solution (Python):

"""
Created on Thu May 14 17:42:30 2020

@author: shinba
"""

h,w = map(int,input().split())

for i in range(h):
    s = input()
    for j in range(2):
        print(s)

Solution (Python):
H,W=map(int,input().split())
C=list(input()for _ in range(H))
for i in C:print(i);print(i)

Solution (Python):
H, W = [int(i) for i in input().split()]
cc = []
for _ in range(H):
    cc.append(input())

for i in range(2 * H):
    print(cc[i // 2])

Solution (Python):
h , w = map(int , input().split())
for i in range(h):
  a = input()
  print(a)
  print(a)

Solution (Python):
h, w = map(int, input().split())
for _ in range(h):
    S = input()
    for _ in range(2):
        print(S)

Solution (Python):
H, W = map(int, input().split())
for _ in range(H):
    S = input()
    print(S)
    print(S)

Solution (Python):
h,w = tuple(map(int,input().split()))

s = [input() for _ in range(h)]

for s_i in s:
  print(s_i)
  print(s_i)

Solution (Python):
H,W=map(int,input().split())
C=[list(map(str,input().split())) for i in range(H)]
for i in range(2*H):
    print("".join(C[(i)//2]))

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, W = MAP()
C = [input() for _ in range(H)]

for x in C:
	print(x)
	print(x)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log2
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy, copy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
import numpy as np
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

H, W = MAP()
C = [input() for _ in range(H)]

for i in range(H):
	print(C[i])
	print(C[i])

Solution (Python):
h,w = map(int,input().split())
c_list = [input() 
          for nesya in range(h)]
for c in c_list:
  print(c)
  print(c)

Solution (Python):
H, _ = map(int, input().split())
for _ in range(H):
    row = input()
    print(row, row, sep="\n")

Solution (Python):
h, w = map(int, input().split())

ans = []
for _ in range(h):
  c = input()
  for _ in range(2):
    ans.append(c)
    
for a in ans:
  print(a)

Solution (Python):
h,w = map(int, input().split())
for _ in range(h):
  row = input()
  print(row)
  print(row)

Solution (Python):
h,w = map(int,input().split())
for i in range(h):
  cw = input()
  print(cw)
  print(cw)

Solution (Python):
h , w = map(int,input().split())
for i in range(h):
    kar = input()
    print(kar)
    print(kar)

Solution (Python):
h, w = map(int, input().split())
bits = [input() for _ in range(h)]
for j in bits:
  print(j)
  print(j)

Solution (Python):
H,W = map(int,input().split())
C = []

for i in range(H):
    c = input()
    C.append(c)
for i in range(H):
    for j in range(2):
        print(C[i])

Solution (Python):
N,M = map(int,input().split())
S = [input() for i in range(N)]
for j in range(N):
  print(S[j])
  print(S[j])

Solution (Python):
H, W = map(int, input().split())
for _ in range(H):
    C = input()
    print(C)
    print(C)

Solution (Python):
H, W = map(int, input().split())

for i in range(H):
    row = input()
    print(row)
    print(row)

Solution (Python):
h,w = map(int,input().split())
c = [input() for _ in range(h)]
for i in c:
  print(i)
  print(i)

Solution (Python):
H,W=map(int, input().split())

C = [input() for i in range(H)]
D = []
for i in range(H):
  D.append(C[i])
  D.append(C[i])

for i in range(H*2):
  print(D[i])

Solution (Python):

import sys
input = sys.stdin.readline
import numpy as np









H,W = map(int,input().split())
C = [input().rstrip() for _ in range(H)]

for i in range(H):
    print(C[i])
    print(C[i])

Solution (Python):


def main():
    H, W = map(int, input().split())
    for _ in range(H):
        C = list(map(str, input().split()))
        for i in C:
            print(i)
            print(i)
        


main()

Solution (Python):
h,w = map(int,input().split())
c = [input() for _ in range(h)]

for i in range(h):
    print(c[i])
    print(c[i])

Solution (Python):
H,W = map(int,input().split())
for i in range(H):
    C = input()
    print(C)
    print(C)

Solution (Python):
a,b = map(int,input().split())

for i in range(a):
    l=input()
    print(l)
    print(l)

Solution (Python):
h, w = map(int, input().split())
for i in range(h):
    a = input()
    print(a)
    print(a)

Solution (Python):
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//(math.factorial(n-r)*math.factorial(r))


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor



dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
h, w = map(int, input().split())
ans = []
for i in range(h):
    c = input()
    print(c)
    print(c)

Solution (Python):
h,w = map(int,input().split())
for i in range(h):
    l = input()
    print(l)
    print(l)

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7


h,w=MI()
for i in range(h):
    s=input().rstrip()
    print(s)
    print(s)

Solution (Python):
H, W = map(int, input().split())

ans = []
for i in range(H):
  pixels = input()
  for i in range(2):
    ans.append(pixels)

for i in range(len(ans)):
  print(ans[i])

Solution (Python):
H,W=map(int,input().split())
for i in range(H):
    s=input()
    for j in range(2):
        print(s)

Solution (Python):
H, W = map(int, input().split())

for i in range(H):
    l = list(input().split())
    print(''.join(l))
    print(''.join(l))

Solution (Python):
H, W = map(int, input().split())

for i in range(H):
    l = list(input().split())
    print(''.join(l))
    print(''.join(l))

Solution (Python):
H, W = map(int,input().split())
A = []
for i in range(H):
    A.append(input())
for i in range(2*H):
    print(A[i//2])

Solution (Python):
h, w = map(int, input().split())
s = []
for _ in range(h):
    s.append(input())
for i in s:
    print(i)
    print(i)

Solution (Python):
h,w=map(int,input().split())
c=[input() for _ in range(h)]
for i in range(h):
    print(c[i])
    print(c[i])

Solution (Python):

import sys
from collections import Counter
from itertools import permutations, combinations
from fractions import gcd

from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

def input():
    return sys.stdin.readline()[:-1]

def main():
    h, w = map(int, input().split())
    C = [None] * h
    for i in range(h):
        C[i] = input()
    for i in range(h):
        print(C[i])
        print(C[i])

if __name__ == '__main__':
    main()

Solution (Python):
h,w=map(int,input().split())
for i in range(h):
  s=input()
  print(s)
  print(s)

Solution (Python):
H,W=map(int,input().split())
C=[list(input()) for _ in range(H)]
newc=[[None]*W for _ in range(2*H)]
for i in range(2*H):
    for j in range(W):
        newc[i][j]=C[i//2][j]
for i in range(2*H):
    for j in range(W):
        print(newc[i][j],end="")
    print("\n")

Solution (Python):
h, w = map(int, input().split())
for _ in range(h):
    c = input()
    print(c)
    print(c)

Solution (Python):
H, W = map(int, input().split())
arr = [input() for _ in range(H)]
ans = [arr[i//2] for i in range(2*H)]
print("\n".join(ans))

Solution (Python):
h,w = map(int,input().split())
c = [0]*h
for i in range(h):
    c[i] = list(input())
for i in range(h):
    for _ in range(2):
        for j in range(w):
            print(c[i][j],end='')
        print("")

Solution (Python):
h, w = list(map(int, input().split(' ')))

for i in range(h):
    row = list(input().strip())
    print(''.join(row))
    print(''.join(row))

Solution (Python):
h,w=map(int, input().split())

for i in range(h):
    c=input()
    print(c)
    print(c)

Solution (Python):
def resolve():
    H, W = list(map(int, input().split()))
    C = [input() for i in range(H)]
    for i in range(H):
        print(C[i])
        print(C[i])
    
    

if '__main__' == __name__:
    resolve()

Solution (Python):
h,w = map(int,input().split())
for _ in range(h):
  s = input()
  print(s)
  print(s)

Solution (Python):
H, W = map(int,input().split())
for i in range(H):
    s = input()
    print(s)
    print(s)

Solution (Python):
h,w = map(int,input().split())
c = []

while True:
  try:
    c.append(list(input().split()))    
  except:
    break
    
for i in c:
  for j in i:
    print(j)
    print(j,end="")
  print("")

Solution (Python):
A,B = map(int,input().split())
for i in range(A):
    n = input()
    print(n)
    print(n)

Solution (Python):
h, w = map(int, input().split())
li3 = [list(input()) for _ in range(h)] 
for s in li3:
    print(''.join(s))
    print(''.join(s))

Solution (Python):


h, w = map(int, input().split())
matrix = []
for _ in range(h):
    row = list(input())
    matrix.append(row)
    matrix.append(row)

for m in matrix:
    print(''.join(m))

Solution (Python):
import sys

input = sys.stdin.readline
MOD = 1000000007

H,W = map(int,input().split())

c = []

for i in range(H):
    x = input()[:-1]
    c.append(x)
    

for i in range(2*H):
    print(c[i//2])

Solution (Python):


h,w=map(int,input().split())
c=[input() for _ in range(h)]

for i in range(h):
    print(c[i])
    print(c[i])

Solution (Python):
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for c in C:
    print(c)
    print(c)

Solution (Python):
h,w = map(int, input().split())

c = []
for i in range(h):
    c.append(input())
    
for i in range(h):
    for j in range(2):
        print(c[i])

Solution (Python):
h,w=map(int,input().split())
for i in range(h):
    a=input()
    print(a)
    print(a)

Solution (Python):
h, _ = map(int, input().split())
rows = []
for i in range(h):
    row = input()
    rows.append(row)
    rows.append(row)

for row in rows:
    print(row)

Solution (Python):
H, W = map(int, input().split())
a = []
for i in range(H):
  b = list(input())
  a.append(b)
for i in range(2*H):
  for j in range(W):
    if j != W - 1:
      print(a[i//2][j],end="")
    else:
      print(a[i//2][j])

Solution (Python):
h,w = map(int,input().split())
L = [input() for _ in range(h)]
for l in L:
    print(l)
    print(l)

Solution (Python):
[h,w]=list(map(int,input().split()))

lst=[]
for i in range(h):
    lst.append(input())


lst2=[]
for i in range(h*2):
    lst2.append(lst[i//2])

for i in lst2:
    print(i)

Solution (Python):
[h,w]=list(map(int,input().split()))

lst=[]
for i in range(h):
    lst.append(input())


lst2=[]
for i in range(h*2):
    lst2.append(lst[i//2])

for i in lst2:
    print(i)

Solution (Python):
H, W = map(int, input().split())
C = [input() for h in range(H)]

for c in C:
    print(c)
    print(c)

Solution (Python):

H, W = map(int, input().split())
p = [input() for i in range(H)]

P = []
for i in range(2*H):
    P.append(p[int(i/2)])

for j in P:
    print(j)

Solution (Python):
H,W,*C = open(0).read().split()
for c in C:
  print(c)
  print(c)