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:
# python 3.4.3
import sys
input = sys.stdin.readline
import numpy as np

# -------------------------------------------------------------
# function
# -------------------------------------------------------------


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

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

Submission status: Accepted

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

def main():
    H, W = map(int, input().split())
    for _ in range(H):
        C = list(map(str, input().split()))
        for i in C:
            print(i)
            print(i)
        


main()

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

Submission status: Accepted

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

for i in range(a):
    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:
import itertools
import math
import string
import collections
from collections import Counter
from collections import deque
import sys
sys.setrecursionlimit(2*10**5)
INF = 2**60


def readints():
    return list(map(int, input().split()))


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


def has_duplicates2(seq):
    seen = []
    for item in seq:
        if not(item in seen):
            seen.append(item)
    return len(seq) != len(seen)


def divisor(n):
    divisor = []
    for i in range(1, n+1):
        if n % i == 0:
            divisor.append(i)
    return divisor


# coordinates
dx = [-1, -1, -1, 0, 0, 1, 1, 1]
dy = [-1, 0, 1, -1, 1, -1, 0, 1]
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())
for i in range(h):
    l = input()
    print(l)
    print(l)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
def printns(x): print('\n'.join(x))
def printni(x): print('\n'.join(list(map(str,x))))
inf = 10**17
mod = 10**9 + 7
#s=input().rstrip()

h,w=MI()
for i in range(h):
    s=input().rstrip()
    print(s)
    print(s)

Submission status: Accepted

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

ans = []
for i in range(H):
  pixels = input()
  for i in range(2):
    ans.append(pixels)

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

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

for i in range(H):
    l = list(input().split())
    print(''.join(l))
    print(''.join(l))

Submission status: Accepted

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

for i in range(H):
    l = list(input().split())
    print(''.join(l))
    print(''.join(l))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
import sys
from collections import Counter
from itertools import permutations, combinations
from fractions import gcd
#from math import gcd
from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

def input():
    return sys.stdin.readline()[:-1]

def main():
    h, w = map(int, input().split())
    C = [None] * 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())
for i in range(h):
  s=input()
  print(s)
  print(s)

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
C=[list(input()) for _ in range(H)]
newc=[[None]*W for _ in range(2*H)]
for i in range(2*H):
    for j in range(W):
        newc[i][j]=C[i//2][j]
for i in range(2*H):
    for j in range(W):
        print(newc[i][j],end="")
    print("\n")

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())
arr = [input() for _ in range(H)]
ans = [arr[i//2] for i in range(2*H)]
print("\n".join(ans))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(h):
    row = list(input().strip())
    print(''.join(row))
    print(''.join(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:
def resolve():
    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])
    
    

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

while True:
  try:
    c.append(list(input().split()))    
  except:
    break
    
for i in c:
  for j in i:
    print(j)
    print(j,end="")
  print("")

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
li3 = [list(input()) for _ in range(h)] #n行にmつずつ入力される整数
for s in li3:
    print(''.join(s))
    print(''.join(s))

Submission status: Accepted

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

h, w = map(int, input().split())
matrix = []
for _ in range(h):
    row = list(input())
    matrix.append(row)
    matrix.append(row)

for m in matrix:
    print(''.join(m))

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
MOD = 1000000007

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

c = []

for i in range(H):
    x = input()[:-1]
    c.append(x)
    

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

Submission status: Accepted

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

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

Submission status: Accepted

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

for row in rows:
    print(row)

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
a = []
for i in range(H):
  b = list(input())
  a.append(b)
for i in range(2*H):
  for j in range(W):
    if j != W - 1:
      print(a[i//2][j],end="")
    else:
      print(a[i//2][j])

Submission status: Accepted

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

Submission status: Accepted

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

lst2=[]
for i in range(h*2):
    lst2.append(lst[i//2])
#print(lst2)
for i in lst2:
    print(i)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#Beginner 049 B
H, W = map(int, input().split())
p = [input() for i in range(H)]

P = []
for i in range(2*H):
    P.append(p[int(i/2)])

for j in P:
    print(j)

Submission status: Accepted

Solution code:
H,W,*C = open(0).read().split()
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)]
ans = [[0]*W for _ in range(2*H)]

for i in range(2*H):
  for j in range(W):
    ans[i][j] = C[i//2][j]
  print(*ans[i], sep="")

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

c = [list(input()) for _ in range(h)]
for i in range(h):
    for _ in range(2):
        for j in range(w):
            print(c[i][j], end = "")
        
        print()

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 7)
f_inf = float('inf')
mod = 10 ** 9 + 7


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

    for c in C:
        print(c)


if __name__ == '__main__':
    resolve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

res = [0 for i in range(H*2)]

for i in range(0,H):
    res[(i+1)*2-1] = ab[i]
    res[(i)*2] = ab[i]

for j in range(0,H*2):
    print(res[j])

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

Submission status: Accepted

Solution code:
H = int(list(input().split())[0])
for i in range(H):
  S = input()
  print(S)
  print(S)

Submission status: Accepted

Solution code:
H = int(list(input().split())[0])
for i in range(H):
  S = input()
  print(S)
  print(S)

Submission status: Accepted

Solution code:
n,m = map(int,input().split())
def pr(a):
    print(a)
    print(a)

for i in range(n):
    pr(input())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x, y = map(int,input().split())
ans = []

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

for i in ans:
    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())

List = [list(map(str,input().split())) for i in range(H)]
for i in range(len(List)):
    print(List[i][0])
    print(List[i][0])

Submission status: Accepted

Solution code:
# coding:utf-8
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())
ans = []
for _ in range(H):
    C = input()
    ans.append(C)
    ans.append(C)
for i in range(2 * H):
    print(ans[i])

Submission status: Accepted

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

Submission status: Accepted

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

A = [[""]*W for _ in range(2*H)]
for i in range(2*H):
    for j in range(W):
        A[i][j] = C[i//2][j]

for a in A:
    print("".join(a))

Submission status: Accepted

Solution code:
import sys
readline = sys.stdin.buffer.readline
MOD = 10**9+7
INF = float('inf')

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





if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for line in c_inputs:
    print(line+'\n'+line)

Submission status: Accepted

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

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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


for l in list_score:
    print("".join(l))
    print("".join(l))

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

res = []
for a in al:
    res.append(a)
    res.append(a)

for a in res:
    print(a)

Submission status: Accepted

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

for i in range(H):
    C = list(map(str, input().split()))

    print(''.join(C))
    print(''.join(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:
# from math import factorial,sqrt,ceil,gcd
# from itertools import permutations as permus
# from collections import deque,Counter
# import re
# from functools import lru_cache # 簡単メモ化 @lru_cache(maxsize=1000)
# from decimal import Decimal, getcontext
# # getcontext().prec = 1000
# # eps = Decimal(10) ** (-100)

# import numpy as np
# import networkx as nx
# from scipy.sparse.csgraph import shortest_path, dijkstra, floyd_warshall, bellman_ford, johnson
# from scipy.sparse import csr_matrix
# from scipy.special import comb

# slist = "abcdefghijklmnopqrstuvwxyz"
# 盤面の受け取り
H,W = map(int,input().split())
board = [[] for _ in range(H*2)]
for i in range(H):
    board[2*i] = list(input())
    board[2*i+1] = board[2*i].copy()

# print(*ans)   # unpackして出力。間にスペースが入る
for row in board:
    print(*row,sep="")    #unpackして間にスペース入れずに出力する
# print("{:.10f}".format(ans))
# print("{:0=10d}".format(ans))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
	h, w = map(int, input().split())
	img = []
	ex_img = [[False]*w for _ in range(h*2)]
	for i in range(h):
		r = list(input())
		img.append(r)
	for i in range(h*2):
		for j in range(w):
			ex_img[i][j] = img[i//2][j]
	for i in range(h*2):
		print("".join(ex_img[i]))
resolve()

Submission status: Accepted

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

ans = []

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

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

Submission status: Accepted

Solution code:
def solve(h, w, grid):
    result = []
    for row in grid:
        curSring = "".join(row)
        result.append(curSring)
        result.append(curSring)
    for row in result:
        print(row)


H, W = map(int, input().split())
grid = []
for _ in range(H):
    grid.append(list(input()))
solve(H, W, grid)

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

Submission status: Accepted

Solution code:
H,W = [int(x) for x 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())
for _ in range(h):
  s = input()
  print(s)
  print(s)

Submission status: Accepted

Solution code:
H,W=map(int,input().split())
lsts=[]
for _ in range(H):
  lsts.append(list(input()))
for lst in lsts:
  print(''.join(lst))
  print(''.join(lst))

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

h, w = map(int, readline().split())
for i in range(h):
    c = readline().rstrip().decode()
    print(c + '\n' + c)

Submission status: Accepted

Solution code:
def myAnswer(H:int,W:int,C:list) -> None:
   for c in C:
      print(c)
      print(c)

def modelAnswer():
   tmp=1

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

if __name__ == '__main__':
   main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
icase=0
if icase==0:
    h,w=map(int,input().split())
#    xy=[[1]*w for i in range(2*h)]
    for i in range(h):
        cij=input()
        print(cij)
        print(cij)

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

Submission status: Accepted

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

for line in p:
    print(line)
    print(line)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc049/tasks/abc049_b
h, w = map(int, input().split())
lines = []
for i in range(h):
    lines.append(input())

for line in lines:
    print(line)
    print(line)

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 = [int(x) for x in input().split()]
C = []

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

Submission status: Accepted

Solution code:
nim,mike = map(int, input().split())
for i in range(nim):
    data = input()
    print(data)
    print(data)

Submission status: Accepted

Solution code:
import collections
import sys
import numpy as np
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
MOD = 10**9+7
import itertools
import math

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

Submission status: Accepted

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

li2 = []
for k in range(H*2):
  li2.append(li[k//2])

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
import sys

stdin = sys.stdin
inf = 1 << 60
mod = 1000000007

ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

h, w = na()
c = nsn(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):
    l = input()
    print(l)
    print(l)

Submission status: Accepted

Solution code:
H,W = map(int,(input().split()))
List = [list(map(str,input().split())) for i in range(H)]
n = 0
for i in range(H*2):
  if(i % 2 == 0):
    List2 = List[n]
    for a in List2:
      if(n != 0):
        print("")
        print(a,end = "")
      else:
        print(a,end = "")
  else:
    List2 = List[n]
    for a in List2:
      print("")
      print(a,end = "")
      n += 1

Submission status: Accepted

Solution code:
def main():
    H, W = map(int, input().split())
    org = list()
    expand = [[ 0 for w in range(W)] for h in range(2*H) ]

    for _ in range(H):
        l = input()
        org.append(l)

    for i in range(2*H):
        for j in range(W):
            expand[i][j] = org[i//2][j]

    for i in range(2*H):
        for j in range(W):
            print(expand[i][j], end = "")
        print()
        
main()

Submission status: Accepted

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

ans = ""
for _ in range(H):
    s = input()
    ans += s + '\n'
    ans += s + '\n'

print(ans, end='')

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# import sys
from sys import stdin
H, W = [int(x) for x in stdin.readline().rstrip().split()]

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

Submission status: Accepted

Solution code:
nums = [int(e) for e in input().split()]
c=[]
i=0
k=0
j=0
while(i<nums[0]):
    row = input()
    c.append(row)
    i+=1

while(k<nums[0]):
    j=0
    while(j<2):
        print(c[k],'\n')
        j+=1
    k+=1

Submission status: Accepted

Solution code:
h,w=map(int,input().split())
for i in range(h):
    a=input()
    print('{}\n{}'.format(a,a))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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

    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())
gecko = []
for x in range(h):
    inputa = input()
    gecko.append(inputa)
for y in range(h):
    print(gecko[y])
    print(gecko[y])

Submission status: Accepted

Solution code:
h,w = map(int,input().split())
gecko = []
x = 0
y = 0
for x in range(h):
    inputa = input()
    gecko.append(inputa)
    x += 1
for y in range(h):
    print(gecko[y])
    print(gecko[y])
    y += 1

Submission status: Accepted

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

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

Submission status: Accepted

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

for _ in range(H):
    ci = input().split()
    print("".join(ci))
    print("".join(ci))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
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(h):
    a = input().replace('\n', '')
    print(a+"\n"+a)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin

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

c = [stdin.readline().rstrip() for _ in range(h)]
for ci in c:
    print(ci)
    print(ci)

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())
marks = list(input() for i in range(h))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
for i in open(0).read().split()[2:]:print(i + "\n" + i)

Submission status: Accepted

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

Submission status: Accepted

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

for i in ab:
    print(''.join(map(str,i)))

Submission status: Accepted

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

Submission status: Accepted

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

i = 0
while i < H:
    print(s[i])
    print(s[i])
    i += 1

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC 049: B – たてなが / Thin
h, w = map(int, input().split())
for i in range(h):
    c = input()
    print(c)
    print(c)

Submission status: Accepted

Solution code:
# ABC 049: B – たてなが / Thin
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):
    c = input()
    print(c)
    print(c)

Submission status: Accepted

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

pixels = [input().split() for i in range(H)]

output_pixels = []

for row in pixels:
    for i in range(2):
        output_pixels.append(row)
    
for row in output_pixels:
    print(''.join(row))

Submission status: Accepted

Solution code:
#a = '2 2'
#b = ['*.', '.*']

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

in1 = []
for idx1 in range(h):
    in1.append(input())
#    in1.append(b[idx1])

for item1 in in1:
    print(item1)
    print(item1)

Submission status: Accepted

Solution code:

import math
import itertools
import statistics
#import numpy as np
import collections

#n = int(input())
h, w = list(map(int, input().split()))
#a = list(map(int, input().split()))
c = []
for i in range(h):
    c.append(input())

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