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:
import numpy as np
from sys import stdin


def main():
    h = next_int()
    w = next_int()

    c = np.array([input() for _ in range(h)])

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


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    h = next_int()
    w = next_int()

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

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


def next_int() -> int:
    return int(next_str())


def next_str() -> str:
    result = ""
    while True:
        tmp = stdin.read(1)
        if tmp.strip() != "":
            result += tmp
        elif tmp != '\r':
            break
    return result


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a = input().split(" ")
ar = []
for i in range(int(a[0])):
    l = input()
    ar.append(l)
for j in ar:
    print(j)
    print(j)

Submission status: Accepted

Solution code:
#! /usr/bin/python3
# たてなが / Thin

"""
縦 H ピクセル、横 W ピクセルの画像があります。
全てのピクセルは . または * で表されるものとします。
上から i 番目、左から j 番目のピクセルを表す文字を Ci,j で表します。

この画像を 2 倍縦長にした画像を出力してください。
すなわち、縦 2H ピクセル、横 W ピクセルの画像であって、
上から i 番目、左から j 番目のピクセルは、
C(i+1)⁄2,j (ただし、割り算は切り捨て)と等しい画像を出力してください。
"""

test_mode = False

H, W = map(int, input().split())
img = [0]
img_2x = ['0' for _ in range(H*2 +1)]  # Wx2Hの2次元リスト

for _ in range(H):
    img.append(input())
    if test_mode:
        print(img)

for i in range(1, H*2 +1):
    if test_mode:
        print('i =', i)
    k = (i+1)//2
    img_2x[i] = img[k]
    print(img_2x[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):
    print(c[i])
    print(c[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
for _ in [0]*h:
  a = input()
  print(a+"\n"+a)

Submission status: Accepted

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

for row in C:
    print(row)
    print(row)

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
count = 0
prob_list = []
while count < h:
    prob_list.append(str(input()))
    prob_list.append(prob_list[-1])
    count += 1
for row in prob_list:
    print("".join(row))

Submission status: Accepted

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

Submission status: Accepted

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

for i in ans:
    print(''.join(i))

Submission status: Accepted

Solution code:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
a,b=input().split();
for _ in[0]*int(a):print((input()+"\n")*2)

Submission status: Accepted

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

Submission status: Accepted

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

pic = [[0 for i in range(w)] for j in range(h)]
pic2 = [[0 for i in range(w)] for j in range(2 * h)]

for i in range(h):
    pic[i] = input()
   # print(pic[i])
   # c = [c for c in pic[i]]
   # print(c)

#print(pic[0][0])
#print(pic[0][1])

for i in range(2 * h):
    for j in range(w):
        pic2[i][j] = pic[i //2][j]
    #print(pic2[i])

for i in range(2 * h):
    print(''.join(pic2[i]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = [int(x) for x in input().split()]

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

Submission status: Accepted

Solution code:
il = lambda: list(map(int, input().split()))
ils = lambda n, s="int(input())": [eval(s) for _ in range(n)]

h, w = il()
c = ils(h, "input()")
for i in c:
    print(i)
    print(i)

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

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

Submission status: Accepted

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

for i in range(h):
    temp = input()
    pic.append(temp)
    pic.append(temp)

for s in pic:
    print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
a=[input() for i in range(h)]
x=1
while x<=h:
  print(a[x-1])
  print(a[x-1])
  x=x+1

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

for word in C:
    print(word)
    print(word)

Submission status: Accepted

Solution code:
s,w = map(int,input().split())
ans,temp = [],0
for i in range(s):
    temp = input()
    for l in range(2):
        ans.append(temp)
for n in range(len(ans)):
    print(ans[n])

Submission status: Accepted

Solution code:
import sys
import math
import collections
import itertools
import array
import inspect

# Set max recursion limit
sys.setrecursionlimit(1000000)


# Debug output
def chkprint(*args):
    names = {
        id(v): k
        for k, v in inspect.currentframe().f_back.f_locals.items()
    }
    print(', '.join(
        names.get(id(arg), '???') + ' = ' + repr(arg) for arg in args))


# Binary converter
def to_bin(x):
    return bin(x)[2:]


def li_input():
    return [int(_) for _ in input().split()]


def gcd(n, m):
    if n % m == 0:
        return m
    else:
        return gcd(m, n % m)


def gcd_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = gcd(v, L[i])

    return v


def lcm(n, m):
    return (n * m) // gcd(n, m)


def lcm_list(L):
    v = L[0]

    for i in range(1, len(L)):
        v = lcm(v, L[i])

    return v


# Width First Search (+ Distance)
def wfs_d(D, N, K):
    """
    D: 隣接行列(距離付き)
    N: ノード数
    K: 始点ノード
    """

    dfk = [-1] * (N + 1)
    dfk[K] = 0

    cps = [(K, 0)]
    r = [False] * (N + 1)
    r[K] = True
    while len(cps) != 0:
        n_cps = []
        for cp, cd in cps:
            for i, dfcp in enumerate(D[cp]):
                if dfcp != -1 and not r[i]:
                    dfk[i] = cd + dfcp
                    n_cps.append((i, cd + dfcp))
                    r[i] = True

        cps = n_cps[:]

    return dfk


# Depth First Search (+Distance)
def dfs_d(v, pre, dist):
    """
    v:  現在のノード
    pre: １つ前のノード
    dist: 現在の距離

    以下は別途用意する
    D: 隣接リスト(行列ではない)
    D_dfs_d: dfs_d関数で用いる，始点ノードから見た距離リスト
    """

    global D
    global D_dfs_d

    D_dfs_d[v] = dist

    for next_v, d in D[v]:
        if next_v != pre:
            dfs_d(next_v, v, dist + d)

    return


def sigma(N):
    ans = 0
    for i in range(1, N + 1):
        ans += i
    return ans


class Combination:
    def __init__(self, n, mod):

        g1 = [1, 1]
        g2 = [1, 1]
        inverse = [0, 1]
        for i in range(2, n + 1):
            g1.append((g1[-1] * i) % mod)
            inverse.append((-inverse[mod % i] * (mod // i)) % mod)
            g2.append((g2[-1] * inverse[-1]) % mod)
        self.MOD = mod
        self.N = n
        self.g1 = g1
        self.g2 = g2
        self.inverse = inverse

    def __call__(self, n, r):
        if (r < 0 or r > n):
            return 0
        r = min(r, n - r)
        return self.g1[n] * self.g2[r] * self.g2[n - r] % self.MOD


# --------------------------------------------

dp = None


def main():
    H, W = li_input()
    C = [input().split() for _ in range(H)]

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,_ = 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(' '))

lis = []

for i in range(h):
    lis.append(input())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
C = [[j for j in input()] for i in range(H)]
C2 = [['' for j in range(W)] for i in range(2*H)]
for i in range(2*H):
    for j in range(W):
        C2[i][j] = C[i//2][j]
for i in range(2*H):
    print(''.join(C2[i]))

Submission status: Accepted

Solution code:
#49b
h,w =map(int,input().split())
for _ in range(h):
    l =input()
    print(l)
    print(l)

Submission status: Accepted

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

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

    for i in graph:
        line = i
        print(''.join(line))
        print(''.join(line))

if __name__ == '__main__':
    main()

Submission status: Accepted

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


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

Submission status: Accepted

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

Submission status: Accepted

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

a = [list(map(str,input().split())) for i in range(H)]

for i in a:
    for j in range(2):
        print(''.join(map(str, i)))

Submission status: Accepted

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

re = []

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

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

Submission status: Accepted

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

print("\n".join(["{0}\n{0}".format(line) for line in c]))

Submission status: Accepted

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

ans = [[0 for j in range(w)] for i in range(2 * h)]
for i in range(h):
    c = input()
    for j in range(len(c)):
        ans[i * 2][j] = c[j]
        ans[i * 2 + 1][j] = c[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())
for i in range(H):
    s = input()
    for j in range(2):
        print(s)

Submission status: Accepted

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

C=[]

for i in range(h):
    tmp=list(input())
    C.append(tmp)


for i in range(2*h):
    ans=["0"]*w
    for j in range(w):
        ans[j]=C[i//2][j]
    print(''.join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r, c = (int(x) for x in raw_input().split())
g = [raw_input() for _ in xrange(r)]
for i in xrange(2*r):
	print g[i/2]

Submission status: Accepted

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

d = [c[i//2] for i in range(h*2)]
for x in d:
    print(''.join(x))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

img = [input() for _ in range(h)]
for i in img:
    print(i)
    print(i)

Submission status: Accepted

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

for x in range(len(ans)):
    print(ans[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:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(H):
    print("".join(HW[i]))
    print("".join(HW[i]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for _ in[0]*int(input().split()[0]):print('\n'.join([input()]*2))

Submission status: Accepted

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

wordlist = []

for i in range(h):
  wordlist.append(list(input().split()))


output_string = []
for i in range(h):
  for j in range(2):
    output_string.append(wordlist[i])


for i in range(h * 2):
  print("".join(output_string[i]))

Submission status: Accepted

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

img = [raw_input() for _ in range(H)]

for i in img:
    print i
    print i

Submission status: Accepted

Solution code:
H,W=map(int,raw_input().split())
c = [raw_input() for r in range(H)]
for ci in c:
  print ci
  print ci

Submission status: Accepted

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

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:
x,y=map(int,input().split())
z= [input() for i in range(x)]
for c in z:
 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 C:
    print(i)
    print(i)

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

array = [input() for x in range(h)]
for i in range(h):
    print(array[i])
    print(array[i])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

lines = []
sys.stdin.readline()
for line in sys.stdin:
    line = line.strip()
    print(line)
    print(line)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
table = [[x for x in input()] for _ in range(h)]
ans_table = [[0 for _ in range(w)] for _ in range(2*h)]

for y in range(h):
  ans_y = 2 * y
  ans_table[ans_y] = table[y]
  ans_table[ans_y + 1] = table[y]

for y in range(2*h):
  print("".join(ans_table[y]))

Submission status: Accepted

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

for row in src:
    print(row)
    print(row)

Submission status: Accepted

Solution code:
from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]
data = [stdin.readline().rstrip().split() for _ in range(a)]

for i in range(a):
    str = data[i][0]
    print(str)
    print(str)

Submission status: Accepted

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

for i in range(H):
  for j in range(2):
    print(A[i])

Submission status: Accepted

Solution code:
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())
C = [[0 for i in range(W)] for j in range(H)]
for i in range(H):
    C[i] = list(input().split())
CC = [[0 for i in range(W)] for j in range(2 * H)]
for i in range(H):
    CC[2 * i] = C[i]
    CC[2 * i + 1] = C[i]

for i in range(2 * H):
    print(''.join(CC[i]))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from collections import Counter


def getinputdata():
    # 配列初期化
    array_result = []

    data = input()

    array_result.append(data.split(" "))

    flg = 1

    try:

        while flg:

            data = input()

            array_temp = []

            if (data != ""):

                array_result.append(data.split(" "))

                flg = 1

            else:

                flg = 0
    finally:

        return array_result


arr_data = getinputdata()

h = int(arr_data[0][0])
w = int(arr_data[0][1])

for i in range(1, 1 + h):
    print(arr_data[i][0])
    print(arr_data[i][0])

Submission status: Accepted

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

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

for an in ans:
    print(an)

Submission status: Accepted

Solution code:
# coding: utf-8
H, W = map(int, input().split())
for _ in range(H):
    row = input()
    print(row)
    print(row)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h = int(input().split()[0])

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for i in range(h):
    fig_2.append(fig[i])
    fig_2.append(fig[i])
    
for i in range(len(fig_2)):
    onetime = ''
    for j in range(len(fig_2[i])):
        onetime = onetime + fig_2[i][j]
    print(onetime)

Submission status: Accepted

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

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)

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()))
C = [' ']
for i in range(h):
    s = ' ' + str(input())
    C.append(s)

for i in range(1, 2*h+1):
    for j in range(1, w+1):
        i_ = (i+1)//2
        print(C[i_][j], end='')
    print('')

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem B

if __name__ == '__main__':
    height, width = list(map(int, input().split()))

    for i in range(height):
        line = input()
        print(line + '\n' + line)

Submission status: Accepted

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

# AtCoder Beginner Contest
# Problem B

if __name__ == '__main__':
    height, width = list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
h, _ = list(map(int, input().split()))
pixels = [input() for i in range(h)]
for row in [pixels[j//2] for j in range(2*h)]:
    print(row)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
dotlist = [['' for x in range(W)] for y in range(2*H)]

for i in range(H):
  tmp = input()
  for j in range(W):
    dotlist[2*i][j] = tmp[j]
    dotlist[2*i+1][j] = tmp[j]
for n in range(2*H):
  tmp = ''
  for m in range(W):
    tmp += dotlist[n][m]
  print(tmp)

Submission status: Accepted

Solution code:
import pprint

H, W = [int(n) for n in input().split()]

C = []
for _ in range(H):
    S = input()
    C.append(S)
    C.append(S)

for cc in C:
    print(cc)

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 = list(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())
print('\n'.join([l + '\n' + l
                 for l in [input() for i in range(h)]]))

Submission status: Accepted

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

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, raw_input().split())
C=[raw_input() for _ in range(H)]
for i in C:
	print i
	print i

Submission status: Accepted

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

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 i in range(H)]

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

Submission status: Accepted

Solution code:
H,W = [int(i) for i in input().split()]
ans = []
for i in range(H):
  c = input().strip()
  for j in range(2):
    ans.append(c)
print('\n'.join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

solve()

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()