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())
pixel = [input() for _ in range(h)]
for i in pixel:
    for j in range(2):
        print(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 _ in range(h)]
l = []
for i in range(h):
    l.append(c[i])
    l.append(c[i])
for i in l:
    print(i)

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

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

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

Solution (Python):
n,m = map(int, input().split())

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

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())
p = [input() for _ in range(h)]
for i in range(h):
    print(p[i])
    print(p[i])

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

Solution (Python):
h,w=map(int, input().split())
l=[0]*2*h
for i in range(h):
    c=input()
    l[2*i]=c
    l[2*i+1]=c
    
for i in range(h):
    print(l[2*i])
    print(l[2*i+1])

Solution (Python):
from typing import List


def answer(h: int, w: int, c: List[str]) -> str:
    result = []
    for i in c:
        for _ in range(2):
            result.append(i)

    return '\n'.join(result)


def main():
    h, w = map(int, input().split())
    c = [input() for _ in range(h)]
    print(answer(h, w, c))


if __name__ == '__main__':
    main()

Solution (Python):
from typing import List


def answer(h: int, w: int, c: List[str]) -> str:
    result = ''
    for i in c:
        for j in range(2):
            result += f'{i}\n'

    return result[:-1]


def main():
    h, w = map(int, input().split())
    c = [input() for _ in range(h)]
    print(answer(h, w, c))


if __name__ == '__main__':
    main()

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

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

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

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

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

def main():
    dot=[]
    h,w = map(int,input().split())
    dot=np.array([list(input().rstrip()) for _ in range(h)])
    
    for i in range(1,h+1):
        print("".join(dot[i-1]))
        print("".join(dot[int(i+1/2)-1]))

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):
    c.append(input().split())

for i in range(h):
    s = ''.join(c[i])
    print(s + '\n' + s)

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

Solution (Python):
for i in range(int(input().split()[0])):
 a = input()
 print(a, a, sep='\n')

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 i in range(h)]
for i in range(h):
    print(c[i]+'\n'+c[i])

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

for _ in range(H):
  C = input()
  lis.append(C)
  lis.append(C)

for i in lis:
  print(i)

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

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

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

Solution (Python):
x,y = map(int,input().split())
for _ in range(x):
  N = list(input())
  for _ in range(2):
    print(''.join(N))

Solution (Python):
x,y = map(int,input().split())
L = []

for _ in range(x):
  N = list(input())
  L.append(N)
  L.append(N)
  
for l in L:
  print(''.join(l))

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

Solution (Python):
h, w = map(int, input().split())
c = [list(input()) for _ in range(h)]
cc = [[] for i in range(2 * h)]
for i in range(h):
    cc[2*i].append(c[i])
    print("".join(*cc[2*i]))
    cc[2*i + 1].append(c[i])
    print("".join(*cc[2*i + 1]))

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

for i in L:
    print(i)

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

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

for c in c_l:
    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*2)]

for i in range(H):
    for j in range(W):
        ans[2 * i] += C[i][j]
        ans[2 * i + 1] += C[i][j]
for i in range(2 * H):
    print(ans[i])

Solution (Python):
import sys
sys.setrecursionlimit(4100000)
import math
import itertools
INF = float('inf')
from heapq import heapify, heappop, heappush
import collections
import bisect

def main():
    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])


if __name__ == '__main__':
    main()

Solution (Python):

url = "https://atcoder.jp//contests/abc049/tasks/abc049_b"

def main():
    h, w = list(map(int, input().split()))
    ss = [input() for _ in range(h)]
    for s in ss:
        print(s)
        print(s)

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

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

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

    for c in c_list:
        print(c)
        print(c)


if __name__ == "__main__":
    main()

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

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

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

for i in range(H):
    C = list(map(str, input().split()))
    L.append(C)
    L.append(C)

for i in range(2*H):
    print(L[i][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 = []
for i in range(h):
    a = input()
    c.append(a)
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):
a,b=input().split()
a=int(a)
b=int(b)
c=[input() for i in range(a)]
for i in range(a):
  print(c[i])
  print(c[i])

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

if __name__ == "__main__":
    solve()

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


def read():
    H, W = map(int, input().strip().split())
    C = []
    for i in range(H):
        c = input().strip()
        C.append(c)
    return H, W, C


def solve(H, W, C):
    for c in C:
        print(c)
        print(c)


if __name__ == '__main__':
    inputs = read()
    solve(*inputs)

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

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

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

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

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

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    H, W = map(int, readline().split())

    res = []

    for _ in range(H):
        c = input()
        res.append(c)
        res.append(c)

    for row in res:
        print(row)


if __name__ == '__main__':
    main()

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

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

for s in P:
    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):
  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 = [list(input()) for i in range(h)]

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

for s in ac:
    print(*s, sep='')

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

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

if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

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

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

for line in lines:
  print(line)
  print(line)

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

new_lst = []
for i in range(h):
    new_lst.append(c_lst[i])
    new_lst.append(c_lst[i])

for i in range(len(new_lst)):
    new = new_lst[i][0]
    print(new)

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

Solution (Python):
num = input().split()
hei = int(num[0])
wei = int(num[1])

photo = []

for i in range(hei):
    temp = input()
    temp = list(temp)
    photo.append(temp)
    photo.append(temp)
    
for i in range(hei*2):
    for j in range(wei):
        print(photo[i][j],end="")
    print("\n",end="")

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

Solution (Python):




import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 2
*.
.*"""
        output = """*.
*.
.*
.*"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """1 4
***."""
        output = """***.
***."""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**........."""
        output = """.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*..*.*.......
.......*..*.*.......
........**.*........
........**.*........
.........**.........
.........**........."""
        self.assertIO(input, output)


def resolve():
    H, W = map(int, input().split())
    ans = []
    for i in range(H):
        S = input()
        ans.append(S)
        ans.append(S)

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


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


height, width = map(int, input().split())
for i in range(height):
    str = input()
    print(str)
    print(str)

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

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

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):
def main():
    h, _ = map(int, input().split())
    c = [input() for _ in range(h)]
    for cn in c:
        print(f'{cn}\n{cn}')


if __name__ == "__main__":
    main()

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())
grid = []
for i in range(H):
    array = list(input().strip().split())
    grid.append(array)

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

Solution (Python):
h,w = map(int, raw_input().split())
m = [raw_input() for _ in range(h)]
for i in range(2*h): print ''.join([m[(i)/2][j] for j in range(w)])

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

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

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

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

Solution (Python):
import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

data = []
for _ in range(h):
    
    d0 = str(input())
    print(d0)
    print(d0)

Solution (Python):


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

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

for i in range(h):
    for j in range(2):
        print(row[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):
    c1=input()
    c.append(c1)
    c.append(c1)
for i in range(2*h):
    print(c[i])

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

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

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

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

Solution (Python):


I = int(input().split()[0])
pics = []
for a in range(I):
  	pics.append(input())

for each in pics:
  print(each+"\n"+each)

Solution (Python):
H,W = (int(T) for T in input().split())
for TH in range(0,H):
    C = input()
    print(C+'\n'+C)

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

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

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


if __name__ == "__main__":
    main()

Solution (Python):
def main():
    h, _ = map(int, input().split())
    c = [input() for _ in range(h)]
    for cn in c:
        print(f'{cn}\n{cn}')


if __name__ == "__main__":
    main()

Solution (Python):
from collections import defaultdict,deque
import math
def main():
    h,w=map(int, input().split())
    res = []
    for i in range(h):
        b=input()
        res.append(b)
        res.append(b)
    for i in res:
        print(i)
if __name__ == '__main__':
    main()

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

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


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

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

Solution (Python):
H,W=map(int,input().split())
L=[[] for i in range(2*H)]
for i in range(H):
  L1=list(input())
  L[2*i]=L1
  L[(2*i)+1]=L1
for i in range(2*H):
  print("".join(L[i]))

Solution (Python):

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

C_ans = []
for j in range(H):
    C_ans.append(C[j])
    C_ans.append(C[j])

for k in C_ans:
    print(''.join(k))

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

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

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

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

Solution (Python):


from typing import List


def main():
    args = input().split()
    H = int(args[0])
    W = int(args[1])

    result: List[str] = []
    for row in range(H):
        rowStr = input()
        result.append(rowStr)
        result.append(rowStr)

    for item in result:
        print(item)


if __name__ == "__main__":
    main()

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

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

Solution (Python):




def resolve():
    import sys
    input = sys.stdin.readline
    h, w = [int(x) for x in input().rstrip().split(" ")]
    for i in range(h):
        c = input().rstrip()
        print(c)
        print(c)

if __name__ == "__main__":
    resolve()

Solution (Python):
new = input()
new_str = new.split(" ")
height = int(new_str[0])
for i in range(height):
  line = input()
  print(line)
  print(line)

Solution (Python):
firstline = input()
s = firstline.split()
h = int(s[0])

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

Solution (Python):
a = input()
hw = a.split()
height = int(hw[0])

for line in range(height):
  line = input()
  print(line)
  print(line)

Solution (Python):

def main():
    h, _ = map(int, input().split())
    c = [input() for i in range(h)]

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

if __name__ ==  "__main__":
    main()

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

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

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

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

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 = []
for i in range(h):
    c.append(input())
thined_c = [0] * (2 * h)
for i in range(2 * h):
    s = ''
    for j in range(w):
        s += c[i // 2][j]
    thined_c[i] = s
for s in thined_c:
    print(s)

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

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

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

for j in range(h):
    print("".join(a[j]))
    print("".join(a[j]))

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

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

Solution (Python):
import math
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
import math
import itertools
import collections
import heapq
import re
import numpy as np
from functools import reduce

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: sys.stdin.readline().split()
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

 
h, w = rm()
for _ in range(h):
  s = rr()
  print(s)
  print(s)

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())
gazo = []
for i in range(h):
    gazo.append(str(input()))
for i in range(h):
    print(gazo[i])
    print(gazo[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= list(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):
  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 h in range(H):
    c = input().strip()
    print(c)
    print(c)

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

for j in c:
    print(j)
    print(j)

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

for i in range(len(C)):
  D.append(C[i])
  D.append(C[i])

print("\n".join(D))

Solution (Python):
import sys


inint = lambda: int(sys.stdin.readline())
inintm = lambda: map(int, sys.stdin.readline().split())
inintl = lambda: list(inintm())
instrm = lambda: map(str, sys.stdin.readline().split())
instrl = lambda: list(instrm())

h, w = inintm()
C = []

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

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,s,sep="\n")

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

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

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

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

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

Solution (Python):
N,H=map(int,input().split())
S=list(input() for i in range(N))
for k in range(N):
  for u in range(2):
    print(S[k])

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

Solution (Python):
h, w = [int(x) for x in 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):
    x=input()
    for _ in range(2):
        print(x)

Solution (Python):







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

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



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

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

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

Solution (Python):
import sys
import heapq, math
from itertools import zip_longest, permutations, combinations, combinations_with_replacement
from itertools import accumulate, dropwhile, takewhile, groupby
from functools import lru_cache
from copy import deepcopy

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

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

Solution (Python):
import sys
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
read = sys.stdin.buffer.read
sys.setrecursionlimit(10 ** 7)
INF = float('inf')

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

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

Solution (Python):
H,W=map(int,input().split())
C=[list(map(str,input().split())) for i in range(H)]
ans=[[] for i in range(2*H)]
for i in range(H):
    ans[2*i]=C[i]
    ans[2*i+1]=C[i]

for j in range(2*H):
    print(*ans[j])

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

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

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

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

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

Solution (Python):
s = input()
s = s.split()

for i in range(int(s[0])):
  image = input()
  print(image)
  print(image)