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

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

Submission status: Accepted

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

Submission status: Accepted

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

H,W = map(int,input().split())
C = [list(input()) if i%2 == 0 else [0 for j in range(W)] for i in range(2*H)]
#print(C)
for i in range(2*H):
    if i % 2 == 1:
        for j in range(W):
            C[i][j] = C[i-1][j]
#print(C)
for i in range(2*H):
    for j in range(W):
        if j != W-1:
            print(C[i][j],end='')
        else:
            print(C[i][j])

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):
  g=input()
  print(g)
  print(g)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

Solution code:
import sys

H, W = sys.stdin.readline().split()
C = map(str, sys.stdin)
for i in C:
    print(i)
    print(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:
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import string
import sys

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

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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


abc()

Submission status: Accepted

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

Submission status: Accepted

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

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())
C = list(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):
    s = input()
    for kk in range(2):
        for j in range(w):
            print(s[j], end="")
        print("")

Submission status: Accepted

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

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

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 i in range(H):
    c = input()
    print(c + '\n' + 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:
# -*- coding: utf-8 -*-

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

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

d = c.copy()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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(len(C)):
    print(C[i])
    print(C[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)]
r = []
for x in c:
    r.append(x)
    r.append(x)
print("\n".join(r))

Submission status: Accepted

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

Submission status: Accepted

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

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

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:
# -*- coding: utf-8 -*-
"""
B - たてなが / Thin
https://atcoder.jp/contests/abc049/tasks/abc049_b

"""
import sys


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


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


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# encoding:utf-8
import copy
import random
import bisect #bisect_left　これで二部探索の大小検索が行える
import fractions #最小公倍数などはこっち
import math
import sys

mod = 10**9+7
sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000

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

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

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):
    row = input()
    print(row)
    print(row)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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:
from sys import stdin
H, W = [int(_) for _ in stdin.readline().rstrip().split()]
C = [stdin.readline().rstrip() for _ in range(H)]
for c in C:
  print(c)
  print(c)

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:
import sys, os

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

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


init()
solve()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import copy
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):
    s = input()
    print(s)
    print(s)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(h):
    c = input()
    print(c + "\n" + c)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
h,w = map(int,input().split())
out_space = [["." for _ in range(w)] for _ in range(h*2)]
in_space = [ list(input()) for _ in range(h)]
for i in range(h*2):
    for j in range(w):
        out_space[i][j] = in_space[i//2][j]
for line in out_space:
    print("".join(line))

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

Submission status: Accepted

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

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

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],sep="")
    print(*c[i],sep="")

Submission status: Accepted

Solution code:
h, w = (int(i) for i in 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 = [] 
for h in range(H):
  C.append(str(input()))

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


new_pic = [[]]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H,W = [int(x) for x in 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())
lists = []
for i in range(H):
    a = str(input())
    lists.append(a)
for j in range(H):
    print(lists[j])
    print(lists[j])

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math


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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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:
# ABC049B - たてなが / Thin
h, w = list(map(int, input().rstrip().split()))
lst = [input().rstrip() for _ in range(h)]
for i in lst:
    print(i, i, sep="\n")

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 = (int(_) for _ in input().split())
for i in range(a):
  x = input()
  print(x)
  print(x)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:


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

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
	main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:


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

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

    return h, w, clist

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

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

if __name__ == '__main__':
    submit()

Submission status: Accepted

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

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 i 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):
	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 i in range(2*H):
    print(C[int(i/2)])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

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

line=""
print()

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

Submission status: Accepted

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

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

# 出力
for x in l:
  print(x)
  print(x)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

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

    return '\n'.join(D)


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

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 * 2):
    c = ""
    for j in range(W):
        c += C[int(i / 2)][j]
    
    print(c)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
s=[input() for _ 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())
s=[]
for i in range(h):
    s.append(list(input().split()))
    s.append(s[-1])
for j in range(2*h):
    print("".join(s[j]))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

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

g = []

for h in range(height):

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

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

Submission status: Accepted

Solution code:
import sys
import math

input = sys.stdin.readline

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

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


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

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:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
C = ''
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):
    fig = input()
    print(fig)
    print(fig)

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:
# -*- coding: utf-8 -*-
h,w = map(int,input().split())
c = [0] * h
ans = [0] * (h * 2)
for i in range(h):
    c[i] = list(input().split())
    ans[i*2] = c[i]

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

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

Submission status: Accepted

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


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

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 col in ans:
  print(col)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from functools import reduce

def main():
    # 切り捨て
    # 4 // 3
    # 切り上げ
    #-(-4 // 3)
    
    # 初期値用:十分大きい数(100億)
    # 1e10

    # 初期値用:十分小さい数(-100億)
    # -1e10
    
    # 1文字のみを読み込み
    # 入力:2
    # a = input().rstrip()
    # 変数:a='2'
    
    # スペース区切りで標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a, b, c, d = (int(_) for _ in input().split())  
    # 変数:a=2 b=4 c=5 d =7
    
    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2 4 5 7
    # a = list(int(_) for _ in input().split())
    # 変数:a = [2, 4, 5, 7]    

    # 1文字ずつ標準入力を配列として読み込み
    # 入力:2457
    # a = list(int(_) for _ in input())
    # 変数:a = [2, 4, 5, 7]
    
    H,W = (int(_) for _ in input().split())
    C = []
    tmp = []
    for i in range(H):
        tmp = list(_ for _ in input())
        C.append(''.join(tmp))
        C.append(''.join(tmp))
    
    print('\n'.join(C))
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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())
for i in range(h):
  c = input()
  print(c,c,sep = '\n')

Submission status: Accepted

Solution code:
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 = []
for i in range(h):
    temp = list(map(str, input().split()))
    c.append(temp)
    c.append(temp)
for i in c:
    print(''.join(i))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(h):
    c = input()
    print(c, c, sep='\n')

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
H, W = map(int, input().split())

C = [''] * H
for i in range(H):
    C[i] = input()
    
C2 = [''] * 2 * H
for i in range(1, 2 * H + 1):
    for j in range(W):
        C2[i - 1] += C[(i + 1) // 2 - 1][j]
#        C2[i][j] = C[(i + 1) // 2][j]
        
for i in range(2 * H):
    print(C2[i])