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-----
2 2
*.
.*

-----Sample Output-----
*.
*.
.*
.*


Difficulty: introductory

Starter code:

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

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)

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

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

#
# abc049 b
#

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 = list(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]))


def __starting_point():
    # unittest.main()
    resolve()

__starting_point()

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

def __starting_point():
    main()

__starting_point()

import sys, math
from itertools import combinations as c, product as p
from collections import deque
sys.setrecursionlimit(10**9)


def si(): return input()
def ii(): return int(input())
def fi(): return float(input())
def lstr(): return input().split()
def lint(): return list(map(int, input().split()))
def lint_dec(): return list([int(x) - 1 for x in input().split()])
def lnstr(n): return [input() for _ in range(n)]
def lnint(n): return [int(input()) for _ in range(n)]
def lint_list(n): return [lint() for _ in range(n)]



############################################################
H, W = lint()
image = lnstr(H)
for column in image:
    print(column)
    print(column)


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

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

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

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


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)

# coding: utf-8

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

H, W = list(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]))



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)

def __starting_point():
    main()

__starting_point()

H, _ = map(int, input().split())
for _ in range(H):
    row = input()
    print(row)
    print(row)

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

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

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

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

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) 

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

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

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


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

#-*-coding:utf-8-*-
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]))

def __starting_point():
    main()
__starting_point()

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

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

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


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

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


a,b=list(map(int,input().split()))

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


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

for s in P:
    print(s)
    print(s)

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

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

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

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

for c in c_l:
    print(c)
    print(c)

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)

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

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

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

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

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

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

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="")

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


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

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

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

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

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

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

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


H, W = list(map(int, input().split()))
for i in range(H):
    S = input()
    print((S+'\n'+S))


n,m = map(int, input().split())

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

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

for i in L:
    print(i)


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

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

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


def __starting_point():
    main()

__starting_point()

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

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

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

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

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

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



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

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

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

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

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

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


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

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

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='')

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

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

import sys
input = sys.stdin.readline
sys.setrecursionlimit(200000)


def read():
    H, W = list(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)


def __starting_point():
    inputs = read()
    solve(*inputs)

__starting_point()

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

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


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


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

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

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

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

h, w = map(int,input().split())
pixel = [input() for _ in range(h)]
for i in pixel:
    for j in range(2):
        print(i)

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

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

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

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


def __starting_point():
    main()

__starting_point()

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

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

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)

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

h, w = list(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)


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


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


#!/usr/bin/env python3
H, W = list(map(int, input().split()))
c = [input() for i in range(H)]

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


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

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

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

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

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

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

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

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

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

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

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


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

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

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


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

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

import copy
h,w = map(int,input().split())
li = []
for i in range(h):
    li.append(input())
#print(li)
lis = copy.copy(li)
#print(lis)
#list1 = li+lis
#print(list1)
for i in range(h):
    print(li[i])
    print(lis[i])

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

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


h, w = list(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])))