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):

import sys
import itertools
import math

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


i=0
ID_list=[]
ID_sublist=[]
pixel_list=[]
H_dummy=0
W_dummy=0
C_dummy=0







pixel_list =  [list(input())for i in range(H)]




i=0
j=0
high_pixel_list =[['' for i in range(W)]for j in range(2*H)]


j=0
k=0
for j in range(2*H):
    for k in range(W):
        
        high_pixel_list[j][k]=pixel_list[j//2][k]
    print(''.join(high_pixel_list[j][:]))

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

Solution (Python):
ans=[]
h,w=map(int,input().split())
for i in range(h):
  l=list(input())
  ans.append(l)
  ans.append(l)
for i in range(2*h):
  print(*ans[i],sep='')

Solution (Python):
import sys

h, w, = map(int, sys.stdin.readline().split())
canvas = sys.stdin.read().split()

def main():
    for i in range(h):
        for _ in range(2):
            yield canvas[i]

if __name__ == '__main__':
    ans = main()
    print(*ans, sep='\n')

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

for i in range(2 * h):
    tmp = ''
    for j in range(w):
        tmp += c[i // 2][j]
    print(tmp)

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(' '))
c = []
for i in range(H):
    c.append(input())
for r in c:
    print(r)
    print(r)

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

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

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


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

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

Solution (Python):
h, w = map(int, input().split())
c = [input() for i in range(h)]
a = []
for i in range(h):
    a.append(c[i])
    a.append(c[i])
print(*a, sep="\n")

Solution (Python):
h,w=input().split()
h,w=int(h),int(w)
k=1
li=[]
while k<=h:
    a=input().rstrip()
    li.append(a)
    k+=1
k=0
while k<h:
    print(li[k])
    print(li[k])
    k+=1

Solution (Python):

h,w=map(int,input().split())
l=[list(input()) for i in range(h)]
n=2*h
ans=[]
for i in range(1,1+n):
    ans=l[((i+1)//2)-1]
    print(*ans,sep='')

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

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

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

Solution (Python):
H, W = map(int, input().split())
ret = ""
for _ in range(H):
    s = input()
    ret += s + "\n" + s + "\n"
print(ret)

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):
    row = input()
    print(row)
    print(row)

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

for i in range(h):
    c = list(input())
    x = []
    for j in range(w):
        x.append(c[j])
    ans = ''.join(x)
    print(ans)
    print(ans)

Solution (Python):
HW = list(map(int,input().split()))
H=HW[0]
W=HW[1]
C = [input() for i in range(H)]
tmp=[]

for c in C:
    tmp.append(c)
    tmp.append(c)

print('\n'.join(tmp))

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

lis =[]

for i in range(h):
    lis.append(input())


for a in lis:
    print(a)
    print(a)

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

for i in range(H):
    img_ls.append(input())

for line in img_ls:
    print(line)
    print(line)

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect
import itertools


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    pict = inputs
    new_pict = []

    for row in pict:
        new_pict.append(row)
        new_pict.append(row)
    return new_pict


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    [N, M] = string_to_int(input())
    ret = solve(inputs(N))
    for r in ret:
        print(r)

Solution (Python):
H , W = map(int,input().split())
for i in range(H):
    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):
H,W = map(int, input().split())
C = [input() for _ in range(H)]

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

Solution (Python):
dbflag=""

def debug(*args):
	if ""!=dbflag: print(*args)

if ""!=dbflag: _INDATA=open(dbflag)

def readline():
	if ""!=dbflag:return _INDATA.readline()
	else: return input()


result = -1


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

import numpy as np
data=np.ndarray(shape=(H,W),dtype=object)
for i in range(0,H):
	data[i,:]=list(readline().rstrip())
	
for i in range(0,2*H):
	for j in range(0,W):
		
		print(data[(i)//2, j],end="")
	
	print("")

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

image = []
for i in range(h):
    line = list(input())
    image.append(line)

for i in range(h):
    for j in range(2):
        for j in range(w):
            print(image[i][j], end='')
        print()

Solution (Python):




if __name__ == '__main__':
    H,W=list(map(int,input().split()))
    C=[["" for i in range(W)] for j in range(H)]
    for i in range(H):
        temp=input()
        for j in range(W):
            C[i][j]=temp[j]

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




    for i in range(2*H):
        print(''.join(ans[i]))

Solution (Python):
tate, yoko = map(int, input().split(" "))

for _ in range(tate):
    line = input()
    print(line + '\n' + line)

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

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

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 i in range(h):
    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):
h,w = map(int,input().split())


l=[str(input()) for i in range(h)]

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

Solution (Python):
H, W = map(int, input().split())
C = []
for i in range(H):
    C.append(input())
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())
for i in range(h):
  x=input()
  print(x)
  print(x)

Solution (Python):
from sys import stdin

h,w = [int(x) for x in stdin.readline().rstrip().split()]
li = [["" for i in range(w)]for j in range(h)]
for i in range(h):
    s = stdin.readline().rstrip()
    for j in range(w):
        li[i][j] = s[j]

lin = []

for i in li:
    lin.append(i)
    lin.append(i)

for i in lin:
    print("".join(i))

Solution (Python):

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

c = [input() for i in range(h)]
ans = []
for i in range(2*h):
    ans.append(c[i//2])

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

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

ans_list = []

for i in range(h):
    append = str(input())
    
    ans_list.append(append)
    ans_list.append(append)
    

for j in range(len(ans_list)):
    
    print(ans_list[j])

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 = []
i = 0

while i < H:
    input_list = input()
    ans_list.append(input_list)
    ans_list.append(input_list)
    i += 1

for _ in ans_list:
    print(_)

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

Solution (Python):
h = int(input().split()[0])
for i in range(h):
  line = input()
  print(line)
  print(line)

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=list(map(int,input().split(" ")))
C=[]


for h in range(H):
    C.append(input())


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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict,deque
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def pprint(*A): 
    for a in A:     print(*a,sep='\n')
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    H,W = MI()
    S=[ST() for _ in range(H)]
    for s in S:
        print(s)
        print(s)
if __name__ == '__main__':
    main()

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

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

C = [str(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 i in range(h)]
for c in C:
	[print(c) for i in range(2)]

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=[int(i) for i in input().split()]
for i in range(h):
    lst=[i for i in input().split()]
    for j in lst:
        print(j)
    for j in lst:
        print(j)

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


for _ in range(H):
    s = str(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())
ans = []
for i in range(H):
    S = input()
    ans.append(S)
    ans.append(S)
for i in ans:
    print(i)

Solution (Python):
h, w = map(int, input().split())
c = []
for i in range(h):
    s = input()
    c.append(s)
    c.append(s)
print(*c, sep="\n")

Solution (Python):
H,W = map(int, input().split())
c = list(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):
    s=input()
    print(s+'\n'+s)

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

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

for _ in range(H):
    c = input()
    print(c, c, sep='\n')

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

Solution (Python):
h, w = map(int, input().split())
c = []
for _ in range(h) :
    c += [input()]
ans = []
for i in range(h) :
    ans += [c[i]]
    ans += [c[i]]
print("\n".join(ans))

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

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

    res = []
    for line in lines:
        res.append(line)
        res.append(line)

    return res


if __name__ == '__main__':
    res = solve()
    for line in res:
        print("".join(line))

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

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())
m = []
for i in range(0, H):
  m.append(input())
for i in range(0, H):
  print(m[i])
  print(m[i])

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

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

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

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

Solution (Python):


h,w=map(int,input().split())
s=[]
ans=''
for i in range(h):
    s.append(list(input()))
for j in range(h):
    for l in range(w):
            ans+=s[j][l]
    for k in range(2):
        print(ans)
    ans=''

Solution (Python):

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

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

for row in C:
    print(*row, sep="")
    print(*row, sep="")

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

Solution (Python):

import sys
input = sys.stdin.readline


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

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

Solution (Python):
n,m = [int(i) for i in input().split()]

l = [[i for i in input()] for _ in range(n)]

for i in range(n):
    for j in range(2):
        print(''.join(l[i]))

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

for i in range(h):
    print(*c[i],sep="")
    print(*c[i],sep="")

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

Solution (Python):
def examB():
    H, W = LI()
    C = [LS() for _ in range(H)]
    ans = []
    for i in range(2*H):
        ans.append(C[(i)//2])
    for v in ans:
        print(" ".join(map(str,v)))


import sys
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

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

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

Solution (Python):

h, w = [int(s) for s in input().split()]
c = ['' * w] * h

for i in range(h):
    c[i] = input()

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

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

h,w = inpl()
c = [input() for i in range(h)]
for i in c:
    print(i)
    print(i)

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

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

Solution (Python):
H,W=map(int,input().split())
ans=[]
for i in range(H):
    s=input()
    ans.extend([s,s])
for i in range(2*H):
    print(ans[i])

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

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

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())
L = [input() for i in range(h)]

for i in range(h):
  for j in range(2):
    print(L[i])

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

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

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())
for i in range(H):
    S = input()
    print(S)
    print(S)

Solution (Python):
import math

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

pic = []
for y in range(h):
  p = []
  for x in input():
    p.append(x)
  pic.append(p)

pic_2 = []
for y in range(h*2):
  p_2 = []
  for x in range(w):
    py = int(math.floor(y / 2))
    if len(pic) <= py:
      p_2.append(pic_2[py][x])
    else:
      p_2.append(pic[py][x])
  pic_2.append(p_2)
    
    
for p in pic_2:
  print(''.join(p))

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

result = []

for h_i in range(h):
  row_i = input()
  result.append(row_i)
  result.append(row_i)
  
print(*result, sep='\n')

Solution (Python):
H,W = map(int,input().split())
C = [[0 for _ in range(W+1)]]
for _ in range(H):
    row = list(input())
    row.insert(0,0)
    C.append(row)
F = [[0 for _ in range(W+1)]]
for i in range(1,2*H+1):
    row = [0 for _ in range(W+1)]
    for j in range(1,W+1):
        row[j] = C[(i+1)//2][j]
    F.append(row)
for i in range(1,2*H+1):
    print("".join(F[i][1:]))

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

g = [input() for _ in range(H)]
for i in range(H):
    print(g[i])
    print(g[i])

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

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

Solution (Python):
def main(h, w, c):
    for line in c:
        print(line)
        print(line)


if __name__ == '__main__':
    h, w = map(int, input().split(' '))
    c = []
    for _ in range(h):
        c.append(input())

    main(h, w, c)

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

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

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

for row in c:
    print(row)
    print(row)

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

Solution (Python):
H, W = map(int, input().split())
ary = [list(map(str, list(input().split()))) for i in range(H)]
ary_d = []
for i in range(H):
    ary_d.append(ary[i])
    ary_d.append(ary[i])


print('\n'.join(''.join([str(j) for j in i]) for i in ary_d))

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

Solution (Python):
h,w= (int(x) for x in input().split())
s=[input() for i in range(h)]
for x in s:
	for y in range(2):
		print(x)

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

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

Solution (Python):
H,W = map(int,input().split())
listA =[]
while True:
    try:
        listA.append(list(map(str,input().split())))
    except:
        break;
for i in range(0,2*H):
    for j in range(0,W):
        if j == W-1:
            print(listA[i//2][0][j])
        else:
            print(listA[i//2][0][j],end="")

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

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

for i in range(h) :
    s = input()
    print(s + '\n' + 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().strip().split(' '))
for _ in range(H):
  s = input().strip()
  print(s)
  print(s)

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

MarkList = []
for M in range(H):
    MarkList.append(input().split())

for N in range(2*H):
    if N%2 == 0:
        print("{0}".format(MarkList[int(N/2)][0]))

    else:
        print("{0}".format(MarkList[int((N-1)/2)][0]))

Solution (Python):
H, W = map(int, input().split())
matrix = []
for i in range(H):
    matrix.append(list(map(str, input().split())))
for j in range(H):
    ans = ','.join(matrix[j])
    print(ans)
    print(ans)

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

Solution (Python):
H,W=list(map(int,input().split(" ")))
C=[]
for i in range(H):
    a=input()
    C.append(a)
    C.append(a)
for i in range(len(C)):
    print(C[i])

Solution (Python):
ans = ''

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

for i in range(h):
    s = input()
    if i != 0:
        ans += "\n"
    ans += s + "\n" + s

print(ans)

Solution (Python):
if __name__ == "__main__":
    h, w = map(int, input().split())
    c = []
    for i in range(h):
        c.append(input())
    newC = []
    for i in range(2*h - 1):
        newC.append(c[(i) // 2])
    newC.append(c[len(c) - 1])
    for i in newC:
        print(i)

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

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 i in range(H):
    S = input()
    print(S)
    print(S)

Solution (Python):
import math

def main():
  h, w = map(int, raw_input().split())
  grid = []
  for _ in xrange(h):
    grid.append(raw_input())

  if h == 1:
      for x in xrange(2):
          print(grid[0])
      return
  
  new_grid = []
  for i in xrange((h-1)*2):
      row = ['' for _ in xrange(w)] 
      pos = (i+1)/2
      for j in xrange(w):
          row[j] = grid[pos][j]
      if pos == 0:
          new_grid.append(''.join(row))
      new_grid.append(''.join(row))
  new_grid.append(new_grid[-1])
  
  for row in new_grid:
      print(''.join(row))


main()

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

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

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

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())
feat = []
for i in range(H):
    array = list(input().split())
    print(''.join(array))
    print(''.join(array))

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

Solution (Python):
H, W = list(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):
def resolve():
	h,w=map(int,input().split())
	c=[input() for _ in range(h)]
	for i in range(h):
		print(c[i])
		print(c[i])

resolve()

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())

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

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

Solution (Python):
h, w = map(int, input().split())
r = [list(input()) for i in range(h)]
new_h = [0] * w
new_r = [new_h for i in range(2*h)]
for i in range(0, 2*h, 2):
  new_r[i] = r[(i+1)//2]
  new_r[i+1] = r[(i+1)//2]
for i in new_r:
  print(*i,sep="", end="\n")

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

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

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())
m = [list(input()) for _ in range(h)]

for row in m:
    print(''.join(row + ['\n'] + row))

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    h, w = list(map(int, input().rstrip('\n').split()))
    c = [str(input().rstrip('\n')) for _ in range(h)]
    for i in range(h):
        print(c[i])
        print(c[i])


if __name__ == '__main__':
    slove()

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

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

Solution (Python):


line = input()
sH, sW = line.split()
H = int(sH)
W = int(sW)

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

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

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())

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

Solution (Python):
h, w = map(int, input().split())
c = [0]*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())
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):
  s = input()
  print(s)
  print(s)

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

for i in range(h):
    print("".join(map(str,c[i])))
    print("".join(map(str,c[i])))

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 temp_h in range(h):
  pix = input()
  print(pix)
  print(pix)

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())

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

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()
    for l in range(2):
        print(s)

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

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(' '))
rows = []
for h in range(H):
  row = input()
  print(row)
  print(row)

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())
for i in range(H):
    s = input()
    print(s)
    print(s)

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

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

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

Solution (Python):
H, W = map(int, input().split())
array = []
for _ in range(H):
    s = input()
    array.append(s)
for i in range(H):
    print(array[i])
    print(array[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=[list(map(str,input().split())) for i in range(H)]
for j in C:
    print("".join(j)+"\n"+"".join(j))

Solution (Python):
H, W = map(int, input().split())
C = [input() for i in range(H)]
C2 = []
for i in range(H):
    C2.append(C[i])
    C2.append(C[i])
ans = '\n'.join(C2)
print(ans)

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


if __name__ == "__main__":
    resolve()

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):
    c = input()
    print(c)
    print(c)

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())

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

Solution (Python):


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

for ele in c:
    print(ele)
    print(ele)

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

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

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