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

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

    for row in range(h):
        print(px[row], px[row], sep='\n')

    
    
    
    
    
    
    
    
    


if __name__ == "__main__":

    main()

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

    px = [[0 for j in range(w)] for i in range(h)]
    px_stretch = [[0 for j in range(w)] for i in range(2 * h)]

    for row in range(h):
        px[row] = list(input())

    for row in range(2 * h):
        px_stretch[row] = [px[row // 2][i] for i in range(w)]
        print(''.join(px_stretch[row]))


if __name__ == "__main__":

    main()

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

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

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

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

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, d = [], []
for i in range(h):
    d = list(input())
    c.append(d)
    c.append(d)
for i in range(h * 2):
    for j in range(w):
        print(c[i][j], end="")
    print()

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

for h in range(2*H):
    for w in range(W):
        C2[h][w] = C[h//2][w]

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

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

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

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

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

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

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

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

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

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


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

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

H, W = nl()

pixels = []
for i in range(H):
    row = s()
    pixels.append(row)
    pixels.append(row)

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

Solution (Python):
p=input().rstrip().split(' ')
l=[]
for i in range(0,int(p[0])):
    q=input().rstrip()
    x=list(q)
    l.append(x)
for i in range(0,len(l)):
    for j in range(0,2):
        print(''.join(l[i]))

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

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

for i in range(h):
    s = list(input())
    print("".join(s))
    print("".join(s))

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

Solution (Python):


H,W = map(int,input().split())
C = [list(input()) if i%2 == 0 else [0 for j in range(W)] for i in range(2*H)]

for i in range(2*H):
    if i % 2 == 1:
        for j in range(W):
            C[i][j] = C[i-1][j]

for i in range(2*H):
    for j in range(W):
        if j != W-1:
            print(C[i][j],end='')
        else:
            print(C[i][j])

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

Solution (Python):
import sys
 
H, W = sys.stdin.readline().split()
C =  sys.stdin
for i in C:
    print(i)
    print(i)

Solution (Python):
import sys

H, W = sys.stdin.readline().split()
C =  sys.stdin
for i in C:
    print(i)
    print(i)

Solution (Python):
import sys

H, W = sys.stdin.readline().split()
C = map(str, sys.stdin)
for i in C:
    print(i)
    print(i)

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

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import string
import sys

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

sys.setrecursionlimit(2147483647)
INF = float("inf")

H, W = list(map(int, sys.stdin.readline().split()))
C = [sys.stdin.readline().rstrip() for _ in range(H)]

for r in C:
    print(r)
    print(r)

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

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

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

Solution (Python):
def abc():
    h, w = map(int, input().split())
    f = ['']*(h*2)
    for i in range(h):
        row = input().rstrip()
        f[2*i] = row
        f[2*i+1] = row
    for r in f:
        print(r)


abc()

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

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

Solution (Python):
h, w = map(int,input().split())
l = [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 = list(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):
    s = input()
    for kk in range(2):
        for j in range(w):
            print(s[j], end="")
        print("")

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

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

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

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

d = c.copy()

for i, j in zip(c, d):
    print(''.join(i))
    print(''.join(j))

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

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

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

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

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

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

for _ in range(H):
    s = input()
    print(s + '\n' + s)

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

for i in range(h):
    print("".join(ls[i]))
    print("".join(ls[i]))

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

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

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

for j in range(h):
    for i in range(2):
        print("".join(ans[j]))

Solution (Python):

H, W = map(int, input().split())
C = []
for i in range(H):
    C.append(input())
for i in range(len(C)):
    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())
c = [input() for i in range(h)]
r = []
for x in c:
    r.append(x)
    r.append(x)
print("\n".join(r))

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

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

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

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

Solution (Python):

"""
B - たてなが / Thin
https://atcoder.jp/contests/abc049/tasks/abc049_b

"""
import sys


def solve(H, W, C):
    ans = [['.']*(W) for _ in range(H*2)]
    for y, row in enumerate(C):
        for x, ch in enumerate(row):
            if ch == '*':
                ans[y*2][x] = '*'
                ans[y*2+1][x] = '*'
    return '\n'.join([''.join(r) for r in ans])


def main(args):
    H, W = map(int, input().split())
    C = [input() for _ in range(H)]
    ans = solve(H,  W, C)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) 

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

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

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

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

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

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

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

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

ansPic = ["" for i in range(2*H)]

for i in range(H):
    ansPic[2*i] = Pic[i]
    ansPic[2*i+1] = Pic[i]
    
for i in ansPic:
    print(i)

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

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

Solution (Python):
from sys import stdin
H, W = [int(_) for _ in stdin.readline().rstrip().split()]
C = [stdin.readline().rstrip() for _ in range(H)]
for c in C:
  print(c)
  print(c)

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
def init():
    if 'local' in os.environ :
        sys.stdin = open('./input.txt', 'r')

def solve():
    n ,m = f()
    for i in range(n):
        a = input()
        print(a)
        print(a)


init()
solve()

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

for j in range(height):
    C_line = C[j]
    print(C_line)
    print(C_line)

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

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 copy
h, w = map(int, input().split())

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

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

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

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

for i in range(h):
    c = input()
    print(c + "\n" + 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):
import numpy as np
h,w = map(int,input().split())
out_space = [["." for _ in range(w)] for _ in range(h*2)]
in_space = [ list(input()) for _ in range(h)]
for i in range(h*2):
    for j in range(w):
        out_space[i][j] = in_space[i//2][j]
for line in out_space:
    print("".join(line))

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('{}\n{}'.format(c,c))

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

arr = [input().rstrip()*2 for _ in range(h)]
for i in arr:
  print(i[:m])
  print(i[m:])

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


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

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

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

for h in range(2*H):
  for w in range(W):
    print(C[(h)//2][w], end="")
  print('')

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

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

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

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

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


new_pic = [[]]

for i in range(H):
    for j in range(2):
        for k in range(W):
            print(pic[i][k], end="")
        print("")

Solution (Python):
h,w = (int(num) for num in 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 i in c:
    print(i)
    print(i)

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

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

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

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

Solution (Python):
H=int(input().split()[0])
for _ in[0]*H:s=input();print(s+"\n"+s)

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

Solution (Python):


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

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

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

Solution (Python):
H,W = [int(x) for x in 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):
    S=input()
    print(S)
    print(S)

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

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

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


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

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

for i in range (h):
    print(a[i][:w])
    print(a[i][w:])

Solution (Python):
import math


h, w = [int(n) for n in input().split()]
image = []
for i in range(h):
    image.append(input())

for i in range(h):
    print(image[i] + '\n' + image[i])

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

Solution (Python):
print(*[i*2for i in open(0)][1:])

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

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

Solution (Python):
h,w=map(int,input().split())
box=[]
for i in range(h):
        boxi=list(map(str,input().split()))
        box.append(boxi)
for i in range(h):
    print(''.join(box[i]))
    print(''.join(box[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(2*h):
	print(c[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):

h, w = list(map(int, input().rstrip().split()))
lst = [input().rstrip() for _ in range(h)]
for i in lst:
    print(i, i, sep="\n")

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

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

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

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

for _ in C:
    print(_)
    print(_)

Solution (Python):


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

for i in range(h):
  print(Cn[i])
  print(Cn[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):
  tmp = input()
  for j in range(2):
    print(tmp)

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

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


if __name__ == '__main__':
	main()

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

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

Solution (Python):
H, W = [int(i) for i in input().split()]
i = 0
while i < H:
    hoge = input()
    print(hoge)
    print(hoge)
    i += 1

Solution (Python):


def read_input():
    h, w = map(int, input().split())

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

    return h, w, clist

def submit():
    h, w, clist = read_input()

    for c in clist:
        print(c)
        print(c)

if __name__ == '__main__':
    submit()

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

for i in c:
    print(i)
    print(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 c in C:
    print(c)
    print(c)

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

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

Solution (Python):

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

Solution (Python):
for _ in range(int(input().split()[0])):
    c = input()
    print(c + "\n" + c)

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

Solution (Python):
import numpy as np

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

pic=np.zeros((w,h))

for i in range(h):
    line=input()
    for j in range(w):
        if line[j]=='*':
            pic[j][i]=1
        elif line[j]=='.':
            pic[j][i]=0

line=""
print()

for i in range(h):
    for j in range(w):
        if pic[j][i]==1:
            print('*',end="")
            line=line+'*'
        elif pic[j][i]==0:
            print('.',end="")
            line=line+'.'
    print()
    print(line)
    line=""

Solution (Python):

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

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


for x in l:
  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):
h,_=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 i in range(h):
    print(c[i])
    print(c[i])

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

for item in c:
    print(item)
    print(item)

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

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

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

Solution (Python):
import sys

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

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

    return '\n'.join(D)


if __name__ == '__main__':
    print(main())

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

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

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

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

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

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

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

for i in range(h):
    print(M[i])
    print(M[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())
l=[input() for i in range(h)]
for i in range(2*h):
    print(l[i//2])

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

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

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

Solution (Python):
from sys import stdin

height, width = map(int, input().split())

g = []

for h in range(height):

    l = stdin.readline().split()
    g.append(l)
    g.append(l)

for h in range(height*2):
    print(''.join(map(str, g[h])))

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

Solution (Python):
import sys
import math

input = sys.stdin.readline

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

pic = list(input().rstrip().split() for _ in range(h))


for i in range(h):
    print(pic[i][0])
    print(pic[i][0])

Solution (Python):


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

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

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
def init():
    if 'local' in os.environ :
        sys.stdin = open('./input.txt', 'r')

def solve():
    n ,m = f()
    for i in range(n):
        a = input()
        print(a)
        print(a)


init()
solve()

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 permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

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()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

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

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

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

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

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

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

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

Solution (Python):
print(*[i*2for i in open(0)][1:])

Solution (Python):
_,*t=open(0)
for i in t:print(i+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())
for i in range(H):
    S = input()
    for i in range(2):
        print(S)

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

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

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())
c = [0] * h
ans = [0] * (h * 2)
for i in range(h):
    c[i] = list(input().split())
    ans[i*2] = c[i]

for i in range(h * 2):
    if i % 2 == 1:
        ans[i] = c[int(i/2)][:]

for i in range(len(ans)):
    temp = "".join(ans[i])
    print(temp)

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

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

Solution (Python):
def thin(H: int, W: int, C: list)->list:
    return [C[h//2] for h in range(2*H)]


if __name__ == "__main__":
    H = 0
    H, W = map(int, input().split())
    C = [input() for _ in range(H)]
    ans = thin(H, W, C)
    print('\n'.join(ans))

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

ans = []

for i in range (h):
  s = input()
  ans.append(s)
  ans.append(s)
  
for col in ans:
  print(col)

Solution (Python):
h,w=map(int,input().split());ans=[]
for _ in '1'*h:
	ans.extend([input()]*2)
print('\n'.join(ans))

Solution (Python):
from functools import reduce

def main():
    
    
    
    
    
    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    

    
    
    
    
    
    H,W = (int(_) for _ in input().split())
    C = []
    tmp = []
    for i in range(H):
        tmp = list(_ for _ in input())
        C.append(''.join(tmp))
        C.append(''.join(tmp))
    
    print('\n'.join(C))
if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

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

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