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

c_L = []
for i in range(h):
    c = list(map(str,input().split()))
    #for _ in range(2):
    c_L.append(c)
    c_L.append(c)

for s in c_L:
    print("".join(s))

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
ans=[]
for i in range(h):
    tmp=list(input())
    print("".join(tmp))
    print("".join(tmp))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SI(): return sys.stdin.readline()[:-1]

def main():
    h,w=MI()
    cc=[SI() for _ in range(h)]
    dd=[""]*h*2
    for i in range(h):
        dd[i*2]=dd[i*2+1]=cc[i]
    p2D(dd)

main()

Submission status: Accepted

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

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 numpy as np
# import math
# import copy
# from collections import deque
import sys
input = sys.stdin.readline
# sys.setrecursionlimit(10000)


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

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



main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for y in range(H):
    print(S[y])
    print(S[y])

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

Submission status: Accepted

Solution code:
#import itertools
#import fractions
#import numpy as np
#mod = 10**4 + 7
"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""

# Written by NoKnowledgeGG @YlePhan

#import math
#mod = 10**9+7

def main():
  h,w = map(int,input().split())
  for _ in range(h):
    s = input()
    print(s)
    print(s)
if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
INF = 1 << 60
sys.setrecursionlimit(10 ** 6)

#ここから書き始める
h, w = map(int, input().split())
c = [[j for j in input()] for i in range(h)]
# print(c)
ans = [["" for j in range(w)] for i in range(2 * h)]
for i in range(2 * h):
    for j in range(w):
        # print((i + 1) // 2)
        ans[i][j] = c[i // 2][j]
for i in range(2 * h):
    for j in range(w):
        print(ans[i][j], end="")
    print()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque
from decimal import *


def lcm(x, y):
    return (x * y) // math.gcd(x, y)


if __name__ == '__main__':
    b, c = map(int, input().split())

    for i in range(b):
        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 i in range(h):
    for _ in range(2):
        print("".join(c[i]))

Submission status: Accepted

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

for i in range(h):
    print(''.join(s[i]))
    print(''.join(s[i]))

Submission status: Accepted

Solution code:
H, W = [int(i) for i in input().split()]
for _ in range(H):
    print((input()+"\n")*2,end="")

Submission status: Accepted

Solution code:
x = list(map(int,input().split()))
al= list()
for i in range (x[0]):
    al.append(input())
    al.append(al[2*i])
for i in al:
    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:
H,W = list(map(int, input().split()))
C = ["" for i in range(H)]

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

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

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
list = []
while True:
	try:
		list.append(input())
	except:
		break
for v in list:
	print(v)
	print(v)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import sqrt
from collections import Counter

input = sys.stdin.readline


def I():
    return int(input())


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


def LI():
    return list(MI())


def LIN(n: int):
    return [I() for _ in range(n)]


inf = float("inf")
mod = 10 ** 9 + 7


def main():
    h, w = MI()
    c = [input().split() for _ in range(h)]

    for line in c:
        print(line[0])
        print(line[0])

    pass


if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

for x in c:
    print(x)
    print(x)

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:
h, w = [int(i) for i in input().split()]

str_list = [input() for i in range(h)]

for s in str_list:
    for j in range(2):
        print(s)

Submission status: Accepted

Solution code:
#ABC049.B2回目
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())
S=[input() for _ in range(H)]

for s in S:
    print(s)
    print(s)

Submission status: Accepted

Solution code:
#ABC049.B
H,W = map(int,input().split())
for _ in range (H):
    ans = input()
    print(ans)
    print(ans)

Submission status: Accepted

Solution code:
import bisect,collections,copy,itertools,math,string
def I(): return int(input())
def S(): return input()
def LI(): return list(map(int,input().split()))
def LS(): return list(input().split())
##################################################
H,W = LI()
C = [LS() for _ in range(H)]
for x in C:
    print(*x)
    print(*x)

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
l = list(list(input()) for i in range(h))
for i in l:
  print(''.join(i))
  print("".join(i))

Submission status: Accepted

Solution code:
import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    #n,m,k=list(map(int, readline().strip().split()))
    #arr=list(map(int, readline().strip().split()))
    #n=int(readline().strip())
    h,w=list(map(int, readline().strip().split()))
    for _ in range(h):
        s=readline().strip()
        print(s)
        print(s)

    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

Submission status: Accepted

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

for i in range(H):
  p = input()
  img.append(p)

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

Submission status: Accepted

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

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 k in range(H)]
for e in C:
    print(e)
    print(e)

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

for i in range(h):
    ans = T[i]
    print("".join(ans))
    print("".join(ans))

Submission status: Accepted

Solution code:
H,W=list(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:
# B
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])

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:

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    H,W=MI()
    for i in range(H):
        S=input()
        for _ in range(2):
            print(S)
        

main()

Submission status: Accepted

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

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

for item in ans:
    print(item)

Submission status: Accepted

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

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:
h, w = map(int,input().split())
ans = []
for i in range(h):
    s = input()
    ans = [s for _ in range(2) ]
    for i in ans:
        print(i)

Submission status: Accepted

Solution code:
# import bisect
# import copy
# import fractions
# import math
# import numpy as np
# from collections import Counter, deque
# from itertools import accumulate,permutations, combinations,combinations_with_replacement,product

def resolve():

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

    for i in C:
        print(*i,sep='')
        print(*i,sep='')

resolve()

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())
for _ in [0]*h:
  c=input()
  print(c)
  print(c)

Submission status: Accepted

Solution code:
#B - たてなが
def main(N):
    for i in range(N):
        print(''.join(L[i]))
        print(''.join(L[i]))

H,W = map(int, input().split())
L = [input().split() for l in range(H)]
main(H)

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=["0" for k in range(H)]
for k in range(H):
    C[k]=input()
D=["0"for k in range(2*H)]
for k in range(H):
    D[2*k]=C[k]
    D[2*k+1]=C[k]
for k in range(2*H):
    print(D[k])

Submission status: Accepted

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

for item in ans:
    print(item)

Submission status: Accepted

Solution code:
#B - たてなが
H,W = map(int, input().split())
L = [input().split() for l in range(H)]

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
c = [input() for _ in range(h)]
ans = []
for i in c:
    ans.append(i)
    ans.append(i)
print(*ans, sep='\n')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

L = []

for i in range(h):
    c = input()
    L.append(c)
    L.append(c)

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

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
c=[input()for _ in range(H)]
for h in range(2*H):
    for w in range(W):
        print(c[h//2][w],end='')
    print()

Submission status: Accepted

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

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

    c = [0]*H
    for i in range(H):
        c[i] = input()
    # print(c)

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import numpy as np
H,W = [int(i) for i in input().split()]

C = np.zeros([1,H],dtype = object)

for i in range(H):
    C[0,i] = str(input())
    
C_d = np.zeros([1,2*H],dtype = object)

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc049/tasks/abc049_b

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

pic = []

for i in range(H):
    row = input()
    pic.append(row)

for i in range(H):
    for j in range(2):
        print(pic[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:
h, w = map(int, input().split())
c = [input() for _ in range(h)]
for i in range(h):
    for _ in range(2):
        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:

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

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

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 = input().split()
H = int(H)
W = int(W)
l = []
for i in range(H):
    s = input()
    l.append(s)
for i in range(H):
    print(l[i])
    print(l[i])

Submission status: Accepted

Solution code:
l = input().split(' ')
H = int(l[0])
for i in range(H):
  line = input()
  print(line)
  print(line)

Submission status: Accepted

Solution code:
#abc049 b
h,w=map(int,input().split())
ans=""
for i in range(h):
    s=input()
    s+="\n"
    ans+=s*2
print(ans)

Submission status: Accepted

Solution code:
list=[]
H,W=map(int,input().split())
for a in range(H):
    C=input().split()
    list.append(C)
for b in range(H):
    print(*list[b])
    print(*list[b])

Submission status: Accepted

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

H,W = list(map(int, input().rstrip().split()))
C_list = [input().strip() for _ in range(H)]
#-----

for i in range(H):
    for x in range(2):
        print(C_list[i])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
# import math
# import decimal
# import queue
# import bisect
# import heapq
# import time
# import itertools
# from fractions import Fraction

mod = int(1e9+7)
INF = 1<<29

def main():
    h,w = map(int,input().split())
    c = []
    for i in range(h):
        x = list(input().split())
        c.append(x)
    for i in range(h):
        print(''.join(c[i]))
        print(''.join(c[i]))
    return

if __name__=='__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

x = []
for i in range(h):
    x.append(l[i])
    x.append(m[i])

for j in range(2*h):
    print(x[j])

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


c_new = []
for j in c:
    for k in range(2):
        c_new.append(j)

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

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline

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

lst1 = [readline().rstrip().decode('utf-8') for i in range(h)]
for i in range(h):
    for j in range(2):
        print(lst1[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
h, w = map(int,input().split()) 
c = []
for i in range(h):
    c.append(list(str(input())))

for i in range(h):
    tmp = list(c[i])
    for j in range(w - 1):
        print(tmp[j], end = '')
    print(tmp[w - 1])
    for j in range(w - 1):
        print(tmp[j], end = '')
    print(tmp[w - 1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
C_list = []
for i in range(H):
    C = input()
    C_list.append(C)
for i in range(1, 2*H+1):
    print(C_list[(i+1)//2-1])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
def main():
    H, W = map(int, input().split())
    c_matrix = [input() for _ in range(H)]
    ans = []
    for c_row in c_matrix:
        ans.append(c_row)
        ans.append(c_row)
    print("\n".join(ans))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def I(): return int(input())
def MI(): return map(int, input().split())
def LMI(): return list(map(int, input().split()))
MOD = 10 ** 9 + 7


H, W = MI()
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())
for i in range(h):
    pix=input()
    print(pix,pix,sep="\n")

Submission status: Accepted

Solution code:
def main():
    height, width = map(int, input().split())
    image = [input() for _ in range(height)]
    for img in image:
        for _ in range(2):
            print(img)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in c:
    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 = list(map(int,input().split()))

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

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
l = [list(input()) for i in range(h)]
for i in range(2*h):
    for j in range(w):
        print(l[i//2][j],end="")
    print()

Submission status: Accepted

Solution code:
#ABC049

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


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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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:
H,W=map(int,input().split())
C=[input().split() for i in range(H)]
ans=[]
for i in range(H):
    ans.append(C[i])
    ans.append(C[i])
for j in range(len(ans)):
    print(*ans[j])

Submission status: Accepted

Solution code:
a, b = map(int, input().split())
bs = [input() for i in range(a)]
for x in bs:
    for i in range(2):
        print(x)

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
grid = [input() for _ in range(h)]
for i in range(h):
    print(grid[i])
    print(grid[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:
H, W = map(int, input().split())
input_li = [input() for i in range(H)]
for h in range(H) :
    print(input_li[h])
    print(input_li[h])

Submission status: Accepted

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

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

Submission status: Accepted

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

ans=[]
for i in range(H-1):
    ans.append(C[i])
    ans.append(C[i])

ans.append(C[H-1])
ans.append(C[H-1])

for i in range(len(ans)):
    s=""
    for j in range(len(ans[i])):
        s+=s+ans[i][j]
    print(s)

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())
for _ in range(h):
  s = input()
  print(s+'\n'+s)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import copy
h, w = list(map(int, input().split()))
p = [input().split() for _ in range(h)]
ans = copy.deepcopy(p)
for i in range(h):
  ans.insert(i*2, p[i])
for i in range(h*2):
  print(ans[i][0])

Submission status: Accepted

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

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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

for h in range(H):
    print(''.join(C[h]))
    print(''.join(C[h]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
H,W=map(int,input().split())
c=[list(input()) for _ in range(H)]
wide=np.zeros((H*2,W)).tolist()

#print(c,wide)
for i in range(H):
    for j in range(W):
        wide[2*i][j]=c[i][j]
        wide[2 * i+1][j] = c[i][j]

for i in wide:print(*i, sep='')

Submission status: Accepted

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

for i in range(h):
    buf = input()
    c.append(buf)
    c.append(buf)

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

Submission status: Accepted

Solution code:
H,W = [int(i) for i in input().split()]
pic = ['0'] * H
pica = ['0'] * (2*H)
for i in range(H):
    pic[i] = list(input())
for i in range(2*H):
    if i !=0:
        pica[i] = pic[(i+1)//2 - 1]
    else:
        continue
for i in range(1,2*H):
    k = pica[i]
    pica[i-1] = k
for i in range(2*H):
    k = ''.join(pica[i])
    print(k)

Submission status: Accepted

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

hwl = []
for _ in range(h):
    hw = input()
    hwl.append(hw)

for hw in hwl:
    print(hw)
    print(hw)

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