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

.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*..*.*.......
.......*..*.*.......
........**.*........
........**.*........
.........**.........
.........**.........



Sample input:
2 2
*.
.*


Sample output:
*.
*.
.*
.*

Submission status: Accepted

Solution code:
'''     ░░█ ▄▀█ █   █▀ █░█ █▀█ █▀▀ █▀▀   █▀█ ▄▀█ █▀▄▀█  
        █▄█ █▀█ █   ▄█ █▀█ █▀▄ ██▄ ██▄   █▀▄ █▀█ █░▀░█     '''


# [abc049_b.py] => [27-07-2020 @ 21:56:34] 
# Author & Template by : Udit "luctivud" Gupta
# https://www.linkedin.com/in/udit-gupta-1b7863135/


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

# sys.setrecursionlimit(10**6)

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


# Custom input output is now piped through terminal commands.


S34t = time.time()
# for _testcases_ in range(int(input())): 

n, m = get_ints()

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



S34p = time.time()
# print("Time Elapsed: {}".format(float(S34p-S34t)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#62
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]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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 = ""

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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("")

Submission status: Accepted

Solution code:
LL = input().split()
H = int(LL[0])
W = int(LL[1])
for i in range(H):
  a = input()
  print(a)
  print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
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()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
_, _, *C = open(0).read().split()
for i in C:
    print(i)
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
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#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
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
    #w.sort(key=itemgetter(1),reversed=True)  #二個目の要素で降順並び替え

    #N = int(input())
    H,W = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    S = list(tuple(input()) for i in range(H)) #改行行列

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





if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
a=[]
for i in range(H):
    s=input()
    a.append(s)
    a.append(s)
print(*a,sep="\n")

Submission status: Accepted

Solution code:
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='')

Submission status: Accepted

Solution code:


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
tmp=[]
for _ in range(h):
    tmp.append(input())
for t in tmp:
    print(t)
    print(t)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

# In[3]:


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


# In[ ]:

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#49B
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])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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): # root
		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): # much time
		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()} # 1~n
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): #j:aの個数
			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 = [2]
	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 = [x for x in data if x!=0]
	ans = data[:]
	return ans

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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='')

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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