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 = (int(i) for i in input().split())

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

Submission status: Accepted

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

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:

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)
##############################

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

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

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

Submission status: Accepted

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

for i in range(h):
  pic.append([str for str in input()])

new_pic = []
for one_line in pic:
  new_pic.append("".join(one_line))
  new_pic.append("".join(one_line))

for one_line in new_pic:
  print(one_line)

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().split() for _ in range(H)]

print('\n\n')
for i in range(H):
    print(C[i][0], C[i][0], sep="\n")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

# solve & output
for i in range(H):
    ans = C[i] * 2
    for j in range(2):
        print(ans[j])

Submission status: Accepted

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

if __name__ == '__main__':
    D = main()
    for i in range(len(D)):
        print(D[i])

Submission status: Accepted

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

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

Submission status: Accepted

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

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=[list(input()) for i in range(h)]
for i in range(h,0,-1):
    L.insert(i-1,L[i-1])
for j in range(2*h):
    print(''.join(L[j]))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(H):
  C.insert(2*i+1,C[2*i])
for i in range(2*H):
  print(C[i])

Submission status: Accepted

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

Submission status: Accepted

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

ans = []
for x in c:
    ans.append(x)
    ans.append(x)

for x in ans:
    print(x)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    H, W = map(int, input().split())
    C = [str(input()) for _ in range(H)]
    C2 = [None for _ in range(2*H)]
    for i, c in enumerate(C):
        C2[2*i] = c
        C2[2*i+1] = c
    for c2 in C2:
        print(c2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
o = [input() for i in range(h)]
n = [[0] * (w) for i in range(2*h)]
for i in range(2*h):
  for j in range(w):
    n[i][j] = o[i//2][j]
  print(''.join(n[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:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush, heapify
import math
import itertools
import random
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
INF = float('inf')
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    H,W = inputMap()
    C = []
    for i in range(H):
        c = input()
        C.append(c)
        
    for i in C:
        print(i)
        print(i)
    
if __name__ == "__main__":
	main()

Submission status: Accepted

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

Submission status: Accepted

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

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:
x,y=map(int,input().split())
for _ in range(x):
  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]+"\n"+C[i])

Submission status: Accepted

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

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(''.join(map(str, i)))
    print(''.join(map(str, i)))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import math
import sys
from itertools import accumulate
from functools import reduce
import queue
from fractions import gcd

def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

sys.setrecursionlimit(10000)

mod = 1000000007

"""
# 0埋め, 小数点出力桁指定時のときの出力
a = 100
b = 0.987654321
print("{0:06d}-{1:6f}".format(a,b))
000100-0.987654

# 文字列をリストに格納
char_list = list("abcd") # ["a","b","c","d"]

# 標準入力取得
## 文字列
    = sys.stdin.readline().rstrip()
    = list(sys.stdin.readline().rstrip())
    = [list(list(sys.stdin.readline().rstrip())) for i in range(h)] #文字列を分解して二次元配列入力

## 数値
    = int(sys.stdin.readline())
    = map(int, sys.stdin.readline().split())
    = list(map(int, sys.stdin.readline().split()))
    = [list(map(int,list(sys.stdin.readline().split()))) for i in range(h)]  # 二次元配列入力　二次元マップみたいな入力のとき
"""

if __name__ == "__main__":
    h,w = map(int, sys.stdin.readline().split())
    for i in range(h):
        s= input()
        print(s+"\n"+s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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):
  for j in range(w):
    print(c[(i)//2][j],end="")
    if j == w-1:
      print("\n",end="")

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

for i in range(2 * h):
    for j in range(w):
        row = (i + 2) // 2 - 1
        col = j
        print(c[row][col], end='')
    print()

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
for i in[0]*h:
  a=input()
  print(a);print(a)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
pic = [str(input()) for _ in range(H)]
ans_list = str()
for i in range(1, 2*H+1):
  if i%2 == 0:
    ans_list += pic[int(i/2)-1]
  else:
    ans_list += pic[int((i+1)/2)-1]
for i in range(2*H):
  print(ans_list[i*W:(i+1)*W])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
 #ABC 49, B - thin
h, w = [int(el) for el in input().split(' ')]
C = [list(input()) for i in range(h)]

for i in range(0, 2*h, 2):
    C.insert(i+1, C[i])

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

Submission status: Accepted

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

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

Submission status: Accepted

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



# Generated by 1.1.4 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    h, w = map(int, input().split())
    C = []
    for i in range(h):
        C.append(input())
    
    for i in range(2 * h):
        j = i // 2
        print(C[j])

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)
# input = sys.stdin.readline
from math import factorial



def main():
    high, widdth = map(int, input().split())
    for i in range(high * 2):
        if i % 2 == 0:
            aaa = input()
        print(aaa)







if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
l=[]
for i in range(h):
  l.append([input()])
l2=[]
for j in range(h):
  l2.append(l[j])
  l2.append(l[j])
for k in range(2*h):
  print(''.join(l2[k]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
matrix = []
while True:
    try:
        matrix.append(list(map(str,input().split())))
    except:
        break;
for i in range(len(matrix)):
    print(matrix[i][0])
    print(matrix[i][0])

Submission status: Accepted

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


i = 0
while i < h:
    A = input()
    print(A)
    print(A)
    i += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = map(int,input().split())
src_img = [list(input().split()) for _ in range(H)]
for i in range(H):
    print(*src_img[i])
    print(*src_img[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())
paint=[]
for i in range(h):
    a=list(input().split())
    b="".join(a)
    paint.append(b)
    
for i in range(h):
    print(paint[i])
    print(paint[i])

Submission status: Accepted

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


def solve(h, w, a):
    ret = []
    for i in range(h):
        ret.append(a[i])
        ret.append(a[i])
    for r in ret:
        print(r)


def main():
    h, w = map(int, input().split())
    a = []
    for i in range(h):
        a.append(input())
    solve(h, w, a)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

C_original = [ 0 for j in range(H+1)]

for j in range(H):
    C_original[j+1] = input()
for j in range(2*H):
    print(C_original[(j + 1+1)//2])

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)]
CC=[]
for c in C:
  CC.append(c)
  CC.append(c)
print(*CC,sep="\n")

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())
C = []

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

for i in C:
  print(i)

Submission status: Accepted

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

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 collections import Counter
from collections import deque
from functools import reduce
from operator import mul
from pprint import pprint
import bisect
import copy
import fractions
import itertools
import math
import queue
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))
def COMBINATION(n, r):
    if n < 0 or r < 0 or n < r:
        return 0
    r = min(n-r, r)
    if r == 0:
        return 1
    o = reduce(mul, range(n, n - r, -1))
    u = reduce(mul, range(1, r + 1))
    return o // u
class UnionFind():

    def __init__(self, n):
        self.n = n
        self.node = [i for i in range(n)]
        self.size = [1 for _ in range(n)]

    def same(self, x, y):
        return bool(self.root(x) == self.root(y))

    def root(self, x):
        if self.node[x] == x:
            return x
        else:
            self.node[x] = self.root(self.node[x])  # 経路圧縮
            return self.node[x]

    def unite(self, x, y):
        x, y = self.root(x), self.root(y)
        if x == y:
            return  # 結合不要
        if self.size[x] < self.size[y]:
            x, y = y, x
        self.node[y] = x
        self.size[x] += self.size[y]

    def return_size(self, x):
        return self.size[self.root(x)]


h, w = MI()
c = [IS() for _ in range(h)]
for i in c:
    print(i)
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

c2 = []

for l in c:
  c2.append(l[:])
  c2.append(l)

for l in c2:
  print(l[0])

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

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())
pixel = []
for _ in range(H):
    pixel.append(input())

for _ in range(H):
    print(pixel[_])
    print(pixel[_])

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

C2 = [[''] * W for i in range(H * 2)]

for i in range(H) :
    for j in range(W) :
        i2 = i * 2
        C2[i2][j] = C2[i2+1][j] = C[i][j]
        
for i in range(H * 2) :
    print(''.join(C2[i]))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for j in ans:
    print(''.join(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:
from sys import stdin
H,W = [int(x) for x in stdin.readline().rstrip().split()]
C = []
for _ 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())
graph=[]
for _ in range(h):
    graph.append(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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


if __name__ == "__main__":

    main()

Submission status: Accepted

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

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

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

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


if __name__ == "__main__":

    main()

Submission status: Accepted

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

for i in range(H):
  s = input()
  print(s,s,sep='\n')

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

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

H, W = nl()

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

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

Submission status: Accepted

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

Submission status: Accepted

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