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

lst = []
for _ in range(h):
    column = list(input())
    lst.append(column)
    lst.append(column)

for v in lst:
    print(''.join(v))

Solution (Python):

















import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
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 = []
ans = ""
for h in range(H):
    row = input()
    ans += row + "\n" + row + "\n"

print(ans)

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

res = []
for _ in range(h):
    c = input()
    res.append(c)
    res.append(c)

for c in res:
    print(c)

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):
  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):
  print(C[i])
  print(C[i])

Solution (Python):
'''     ░░█ ▄▀█ █   █▀ █░█ █▀█ █▀▀ █▀▀   █▀█ ▄▀█ █▀▄▀█  
        █▄█ █▀█ █   ▄█ █▀█ █▀▄ ██▄ ██▄   █▀▄ █▀█ █░▀░█     '''







import math;   from collections import *
import sys;    from functools import reduce
import time;   from itertools import groupby



def input()         : return sys.stdin.readline()
def get_ints()      : return map(int, input().strip().split())
def get_list()      : return list(get_ints())
def get_string()    : return list(input().strip().split())
def printxsp(*args) : return print(*args, end="")
def printsp(*args)  : return print(*args, end=" ")


DIRECTIONS = [(+0, +1), (+0, -1), (+1, +0), (+1, -1)] 
NEIGHBOURS = [(-1, -1), (-1, +0), (-1, +1), (+0, -1),\
              (+1, +1), (+1, +0), (+1, -1), (+0, +1)]


CAPS_ALPHABETS = {chr(i+ord('A')) : i for i in range(26)}
SMOL_ALPHABETS = {chr(i+ord('a')) : i for i in range(26)}
INF = float('inf')





S34t = time.time()


n, m = get_ints()

for i in range(n):
    s = input()
    print(s, end="")
    print(s, end="")



S34p = time.time()

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

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

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

Solution (Python):


def main():

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

    C = []

    for i in range(H):
        a = input()
        C.append(a)

    for i in C:
        print(i)
        print(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 = []
for i in range(h):
    a = list(map(str,input().split()))
    c.append(a)
    c.append(a)
    
for i in range(2*h):
    print("".join(c[i]))

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

ans=[]
for i in range(2*H):
    i//=2
    ans.append(C[i])

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

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

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

Solution (Python):
h,w=map(int,input().split())
c=[input() for _ in range(h)]
s=''
for i in range(2*h):
    s+=f'{c[i//2]}\n'
print(s)

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

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

for row in l:
  for _ in range(2):
	  print(''.join(row))

Solution (Python):
def main():
    h, w = map(int, input().split())
    cs = [list(input()) for _ in range(h)]
    for i in range(h):
        print(*cs[i], sep="")
        print(*cs[i], sep="")


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import sys
input()
l=sys.stdin.read().split()
for line in l:
  print(line)
  print(line)

Solution (Python):
H,W=map(int,input().split())
List = []
for i in range (H):
  a=input()
  List.append(list(a))
New_List=[]
for i in range(H):
  New_List.append(List[i])
  New_List.append(List[i])
res = ""
for i in range(2*H):
  for j in range(W):
    res += New_List[i][j]
  print(res)
  res = ""

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

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

    return


if __name__ == '__main__':
    main()

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    ans = [0] * (2 * H)
    for i in range(2 * H):
        ans[i] = C[i // 2]

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

    return


if __name__ == '__main__':
    main()

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

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

for i in L:
    print(i, flush=True)
    print(i, flush=True)

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

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())
C = list( input() for _ in range(H) )

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

Solution (Python):
H, W = 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):
h, w = map(int, input().split())

lis = [list(input().split()) for _ in range(h)]

for i in lis:
    for _ in range(2):
        for j in i:
            print(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())
img = [list(input()) for i in range(h)]
out = [[0 for j in range(w)] for i in range(2*h)]
for i in range(2*h) :
    for j in range(w) :
        out[i][j] = img[int(i/2)][j]
for i in range(2*h) :
    for j in range(w) :
        print(out[i][j],sep="",end="")
    print("")

Solution (Python):
LL = input().split()
H = int(LL[0])
W = int(LL[1])
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 ci in c:
  print(ci)
  print(ci)

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=[list(input()) for i in range(h)]
for c in C:
    print(''.join(c))
    print(''.join(c))

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

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

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

Solution (Python):
H, W = map(int, input().split())
C = []
for _ in range(H):
    c = input()
    C.append(c)
    C.append(c)
print(*C, sep='\n')

Solution (Python):
import sys, os, math, bisect, itertools, collections, heapq, queue

from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

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


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    H, W = il()
    C = [iss() for _ in range(H)]

    for c in C:
        for _ in range(2):
            print(c)




if __name__ == '__main__':
    main()

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

pic = []
for i in range(h):
    pic.append(c[i])
    pic.append(c[i])
    
for i in range(len(pic)):
    print(''.join(pic[i]))

Solution (Python):
import numpy as np

s = input().split()


h = int(s[0])


w = int(s[1])


answer = []

for num in range(h):
    x = input().split()
    answer.append(x[0])
    answer.append(x[0])

for num in range(h * 2):
    print(answer[num])

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

Solution (Python):
import sys
def rs(): return sys.stdin.readline().rstrip()
def ri(): return int(rs())
def rs_(): return [_ for _ in rs().split()]
def ri_(): return [int(_) for _ in rs().split()]

H, W = ri_()
c = [rs() for _ in range(H)]
for ci in c:
    print(ci)
    print(ci)

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 = list(map(int, input().split()))
C = [None] * (2 * H)
for i in range(0, 2 * H, 2):
    C[i] = input()
    C[i + 1] = C[i]
for c in C:
    print(c)

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

for c in lc:
    print(c)
    print(c)

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

Solution (Python):
h,w =list(map(int,input().split()))
c =[input() for i in range(h)]
d = []
for ih in range(2*h):
    print(c[ih//2])

Solution (Python):

_, _, *C = open(0).read().split()
for i in C:
    print(i)
    print(i)

Solution (Python):
import sys
input = sys.stdin.readline

H, W = map(int, input().split())
fig_ori = []
fig = []
for i in range(H):
    fig_ori.append(list(input().rstrip('\n')))
for i in range(2 * H):
    low = []
    for j in range(W):
        low.append(fig_ori[(i+1+1)//2-1][j])
    fig.append(low)

for i in range(2 * H):
    for j in range(W):
        print(fig[i][j], end='')
    print()

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

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

Solution (Python):
import sys
sys.setrecursionlimit(500000)
MOD = 10**9+7

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

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

def ii():
    return int(input())

def i2(n):
    tmp = [list(mi()) for i in range(n)]
    return [list(i) for i in zip(*tmp)]

def main():
    H, W = mi()
    C = [input() for i in range(H)]
    for i in range(H):
        print(C[i], C[i], sep='\n')


if __name__ == '__main__':
    main()

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

for i in range(H):
    a = input()
    for _ in range(2):
        print(a)

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

for c in C:
    print(c, c, sep="\n")

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

for c in C:
    print(''.join(c))
    print(''.join(c))

Solution (Python):
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

h,w = i2()
for i in range(h):
	c = s()
	print(c)
	print(c)

Solution (Python):

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

for c_i in c:
    print(c_i)
    print(c_i)

Solution (Python):


h, w = map(int, input().split())
c = [[] 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())
cl = [ input() for _ in range(h)]

for i in range(2*h):
    if i%2 == 0:
        print(cl[i//2])
    else:
        print(cl[(i-1)//2])

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

Solution (Python):
import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

def main():
	h, w = LI()
	original = GRIDfromString(h, w)
	modified = np.full((2*h,w), b'')
	for i in range(2*h):
		modified[i] = original[i//2]
	for modified_line in modified:
		for modified_point in modified_line:
			print(modified_point.decode(),end='')
		print('\r')

if __name__ == '__main__':
    main()

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):
import sys
sys.setrecursionlimit(10**7) 
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right

from collections import deque, defaultdict


from collections import Counter

from itertools import accumulate,combinations,permutations

from heapq import heapify,heappop,heappush


from functools import reduce,lru_cache

from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    

    
    H,W = map(int, input().split())
    
    
    S = list(tuple(input()) for i in range(H)) 

    for li in S:
        print(*li,sep="")
        print(*li,sep="")





if __name__ == "__main__":
    main()

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

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

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

for i in li:
    print(i,i,sep="\n")

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

Solution (Python):
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])

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

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

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

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

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

Solution (Python):


h, w = map(int, input().split())
rct = []

for x in range(h):
    pix = str(input())
    rct.append(pix)

for x in rct:
    print(x)
    print(x)

Solution (Python):


h, w = map(int, input().split())
rct = []

for x in range(h):
    pix = str(input())
    rct.append(pix)
    rct.append(pix)

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

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

for i in range(h):
    x = c[i]
    print(''.join(x))
    print(''.join(x))

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())
a=[]
for i in range(H):
    s=input()
    a.append(s)
    a.append(s)
print(*a,sep="\n")

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

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    H, W = read_ints()
    for _ in range(H):
        C = input().strip()
        print(C)
        print(C)


if __name__ == '__main__':
    solve()

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

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

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

Solution (Python):
H,W=map(int,input().split())
cw=[input() for _ in range(H)]
[print(i + '\n' + j) for i,j in zip(cw,cw)]

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

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

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

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())
tmp=[]
for _ in range(h):
    tmp.append(input())
for t in tmp:
    print(t)
    print(t)

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

Solution (Python):
h, w = map(int, input().split())
s = list(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())

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

Solution (Python):
from collections import defaultdict

def main():
    H,W = [int(x) for x in input().split()]
    S = []
    for _ in range(H):
        S.append(input())
    for s in S:
        print(s)
        print(s)

if __name__ == '__main__':
    main()

Solution (Python):






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

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

for i in range(H):
  print('{}\n{}'.format(c[i],c[i]))

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

for h in range(H * 2):
    ans = []
    for w in range(W):
        ans.append(C[h // 2][w])
    print(''.join(ans))

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

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

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

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

H,W=map(int,(input().split()))
C=[input() for i in range(H)]
ans = ""
for i in range(H):
    ans = ans + C[i] + '\n'+C[i]+'\n'
print(ans[:-1])

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

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())
C = [input() for i in range(H)]
for px in C:
    print(px)
    print(px)

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

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

Solution (Python):
import math
from collections import deque
from collections import defaultdict
import itertools as it


def readInt():
	return int(input())
def readInts():
	return list(map(int, input().split()))
def readChar():
	return input()
def readChars():
	return input().split()
def factorization(n):
	res = []
	if n%2==0:
		res.append(2)
	for i in range(3,math.floor(n//2)+1,2):
		if n%i==0:
			c = 0
			for j in res:
				if i%j==0:
					c=1
			if c==0:
				res.append(i)
	return res
def fact2(n):
	p = factorization(n)
	res = []
	for i in p:
		c=0
		z=n
		while 1:
			if z%i==0:
				c+=1
				z/=i
			else:
				break
		res.append([i,c])
	return res
def fact(n):
	ans = 1
	m=n
	for _i in range(n-1):
		ans*=m
		m-=1
	return ans
def comb(n,r):
	if n<r:
		return 0
	l = min(r,n-r)
	m=n
	u=1
	for _i in range(l):
		u*=m
		m-=1
	return u//fact(l)
def combmod(n,r,mod):
	return (fact(n)/fact(n-r)*pow(fact(r),mod-2,mod))%mod
def printQueue(q):
	r=copyQueue(q)
	ans=[0]*r.qsize()
	for i in range(r.qsize()-1,-1,-1):
		ans[i] = r.get()
	print(ans)
class UnionFind():
	def __init__(self, n):
		self.n = n
		self.parents = [-1]*n

	def find(self, x): 
		if self.parents[x]<0:
			return x
		else:
			self.parents[x] = self.find(self.parents[x])
			return self.parents[x]

	def union(self,x,y):
		x = self.find(x)
		y = self.find(y)

		if x==y:
			return

		if self.parents[x]>self.parents[y]:
			x,y = y,x

		self.parents[x]+=self.parents[y]
		self.parents[y]=x

	def size(self,x):
		return -1*self.parents[self.find(x)]

	def same(self,x,y):
		return self.find(x)==self.find(y)

	def members(self,x): 
		root = self.find(x)
		return [i for i in range(self.n) if self.find(i)==root]

	def roots(self):
		return [i for i,x in enumerate(self.parents) if x<0]

	def group_count(self):
		return len(self.roots())

	def all_group_members(self):
		return {r: self.members(r) for r in self.roots()} 
def bitArr(n):
	x = 1
	zero = "0"*n
	ans = []
	ans.append([0]*n)
	for i in range(2**n-1):
		ans.append(list(map(lambda x:int(x),list((zero+bin(x)[2:])[-1*n:]))))
		x+=1
	return ans;
def arrsSum(a1,a2):
	for i in range(len(a1)):
		a1[i]+=a2[i]
	return a1
def maxValue(a,b,v):
	v2 = v
	for i in range(v2,-1,-1):
		for j in range(v2//a+1): 
			k = i-a*j
			if k%b==0:
				return i
	return -1
def copyQueue(q):
	nq = queue.Queue()
	n = q.qsize()
	for i in range(n):
		x = q.get()
		q.put(x)
		nq.put(x)
	return nq
def get_sieve_of_eratosthenes(n):
	
	data = [0,0,0]
	for i in range(3,n+1,2):
		data.append(i)
		data.append(0)
	for i in range(len(data)):
		interval = data[i]
		if interval!=0:
			for j in range(i+interval,n-1,interval):
				data[j] = 0
	
	ans = data[:]
	return ans

h,w = readInts()
c = []
for i in range(h):
	x = input()
	print(x)
	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())
c=[input() for _ in range(h)]
for i in range(1,h*2+1):
    print(c[(i+1)//2-1])

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

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
H, W = map(int, input().split())
C = list(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 i in range(H):
    S = input()
    print(S)
    print(S)

Solution (Python):
def abc049_b():
    H, _ = map(int, input().split())
    C = [str(input()) for _ in range(H)]
    stretch = []
    for ln in C:
        stretch.append(ln)
        stretch.append(ln)
    print(*stretch, sep='\n')

abc049_b()

Solution (Python):
h,w=map(int,input().split())
s=[input() for i in range(h)]
for i in range(2*h):
    for j in range(w):
        if j==w-1:
            print(s[int(i)//2][j])
        else:
            print(s[i//2][j],end='')

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

for c in table:
    print(c)
    print(c)

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

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())
C = []
for i in range(H):
    C.append(input())
for i in range(2*H):
    print(C[i//2])

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

Solution (Python):



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

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

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

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

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())
result = [""] * (H*2)
for i in range(H):
    C = input()
    for j in range(W):
        result[2 * i] = C
        result[2 * i + 1] = C
for i in range(H * 2):
    print(result[i])

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

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

for i in range(0,H):
  arr = input()
  ans.append(arr)
  ans.append(arr)

for i in range(0,H*2):
  print(ans[i])

Solution (Python):
H, W = 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())
for i in range(H):
  tmp=input()
  print(tmp)
  print(tmp)

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

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

for i in range(h):
  print(Ans[2*i])
  print(Ans[2*i+1])

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

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