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

for i in range(H):
    array.append(input())
for j in array:
    print(j)
    print(j)

Submission status: Accepted

Solution code:
h=int(input().split()[0])
c=[input() for _ in [0]*h]
for _c in c:
    print(_c)
    print(_c)

Submission status: Accepted

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

pic = [list(input()) for i in range(H)]

wide = pic

Ans = []

for i in range(H):
	Ans.append(pic[i])
	Ans.append(wide[i])

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

Submission status: Accepted

Solution code:
def main():
    H, W = map(int, input().split())
    C = [list(input()) for _ in range(H)]
    
    for x in range(H):
        for _ in range(2):
            for y in range(W):
                if y == W - 1:
                    print(C[x][y])
                else:
                    print(C[x][y], end = "")


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

for i in li:
  print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import math
import itertools
import heapq
import numpy as np
from collections import OrderedDict, deque, Counter
from bisect import bisect_left, bisect_right, insort_left, insort_right
sys.setrecursionlimit(10000)

dx = [1, 0, -1, 0]
dy = [0, 1, 0, -1]


class Dijkstra():
    def dijkstra(self, adj, start, goal=None):
        '''
        ダイクストラアルゴリズムによる最短経路を求めるメソッド
        入力
        adj: adj[i][j]の値が頂点iから頂点jまでの距離(頂点iから頂点jに枝がない場合，値はfloat('inf'))となるような2次元リスト(正方行列)
        start: 始点のID
        goal: オプション引数．終点のID
        出力
        goalを引数に持つ場合，startからgoalまでの最短経路を格納したリストを返す
        持たない場合は，startから各頂点までの最短距離を格納したリストを返す
        d = Dijkstra()
        d.dijkstra([[float('inf'), 2, 4, float('inf'), float('inf')], [2, float('inf'), 3, 5, float('inf')], [4, 3, float('inf'), 1, 4], [float('inf'), 5, 1, float('inf'), 3], [float('inf'), float('inf'), 4, 3, float('inf')]], 0)
        [0, 2, 4, 5, 8] # 例えば，始点0から頂点3までの最短距離は5となる
        d.dijkstra([[float('inf'), 2, 4, float('inf'), float('inf')], [2, float('inf'), 3, 5, float('inf')], [4, 3, float('inf'), 1, 4], [float('inf'), 5, 1, float('inf'), 3], [float('inf'), float('inf'), 4, 3, float('inf')]], 0, goal=4)
        [0, 2, 4] # 頂点0から頂点4までの最短経路は0 -> 2 -> 4となる
        '''
        num = len(adj)  # グラフのノード数
        dist = [float('inf') for i in range(num)]  # 始点から各頂点までの最短距離を格納する
        prev = [float('inf') for i in range(num)]  # 最短経路における，その頂点の前の頂点のIDを格納する

        dist[start] = 0
        q = []  # プライオリティキュー．各要素は，(startからある頂点vまでの仮の距離, 頂点vのID)からなるタプル
        heapq.heappush(q, (0, start))  # 始点をpush

        while len(q) != 0:
            prov_cost, src = heapq.heappop(q)  # pop

            # プライオリティキューに格納されている最短距離が，現在計算できている最短距離より大きければ，distの更新をする必要はない
            if dist[src] < prov_cost:
                continue

            # 他の頂点の探索
            for dest in range(num):
                cost = adj[src][dest]
                if cost != float('inf') and dist[dest] > dist[src] + cost:
                    dist[dest] = dist[src] + cost  # distの更新
                    heapq.heappush(q, (dist[dest], dest))  # キューに新たな仮の距離の情報をpush
                    prev[dest] = src  # 前の頂点を記録

        if goal is not None:
            return self.get_path(goal, prev)
        else:
            return dist

    def get_path(self, goal, prev):
        '''
        始点startから終点goalまでの最短経路を求める
        '''
        path = [goal]  # 最短経路
        dest = goal

        # 終点から最短経路を逆順に辿る
        while prev[dest] != float('inf'):
            path.append(prev[dest])
            dest = prev[dest]

        # 経路をreverseして出力
        return list(reversed(path))


class EndLoop(Exception):
    pass


def debug_print(L):
    for col in L:
        print(col)


def combination(n, k):  # return the result of nCk
    dp = [[0] * (n + 1) for i in range(n + 1)]
    for i in range(n + 1):
        dp[i][0] = 1
        dp[i][i] = 1
    for i in range(2, n + 1):
        for j in range(1, i):
            dp[i][j] = dp[i - 1][j - 1] + dp[i - 1][j]

    return dp[n][k]


def debug_print_joined(L):
    for col in L:
        print("".join(col))


def transpose_matrix(L):
    transposed = list(map(list, zip(*L)))
    return transposed


def solve():
    H, W = list(map(int, input().split(" ")))
    image_input = []
    for i in range(H):
        tmp = input()
        image_input.append(tmp)
    image_input.insert(0, "hoge")

    image_output = [[] for _ in range(H * 2 + 1)]
    for i in range(1, H * 2 + 1):
        for j in range(W):
            image_output[i].append(image_input[int(math.floor((i + 1) / 2))][j])

    for i in range(1, len(image_output)):
        print("".join(image_output[i]))

solve()

Submission status: Accepted

Solution code:

a = input().split()
n = int(a[0])
m = a[1]
s = "";
for i in range(0, n):
    tmp = input()
    if i != 0:
        s = s + "\n" + tmp + "\n" + tmp
    else:
        s = s + tmp + "\n" + tmp
print(s)

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



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

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

if __name__ == "__main__": main()

Submission status: Accepted

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

for i in range(int(h)):
    a = input()
    print(a)
    print(a)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, _ = 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())
for i in range(H):
    C = input()
    for i in range(2):
        print(C)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w=[int(x) for x in input().split()]
C=[]
for i in [0]*h:
    C.append(input())
for c in C:
    print(c)
    print(c)

Submission status: Accepted

Solution code:
n,k = map(int, raw_input().strip().split())
for x in xrange(n):
	a = raw_input()
	print(a)
	print(a)

Submission status: Accepted

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

D=[]

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

Submission status: Accepted

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

X = C.copy()
for i in range(H):
    print(C[i])
    print(X[i])

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import numpy as np
input_line = map(int,raw_input().split(" "))
H = input_line[0]
W = input_line[1]
C = np.array([])
for h in range(H):
	tmp = list(raw_input())
	C = np.append(C,np.array(tmp))
	C = np.append(C,np.array(tmp))
	

C = C.reshape(2*H,W)
txt = ""
for c in C:
	for cc in c:
		txt += cc
	print txt
	txt = ""

Submission status: Accepted

Solution code:
import sys

# sys.stdin = open('b1.in')


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


def read_str_list():
    return input().split()


def read_int():
    return int(input())


def read_str():
    return input()


def main():
    h, w = read_int_list()
    for i in range(h):
        l = read_str()
        print(l)
        print(l)



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:
from collections import defaultdict


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
def ri(): return int(input())
def rli(): return list(map(int, input().split()))
def rls(): return list(input())
def pli(a): return "".join(list(map(str, a)))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

    for c in C:
        print(c, c, sep='\n')

main()

Submission status: Accepted

Solution code:
a = input().split()
h = int(a[0])
w = int(a[1])
s = []
for i in range(h):
    l = input()
    s.append(l)

for i in s:
    print(i)
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(H):
    ans = ''.join(C[i])
    for j in range(2):
        print(ans)

Submission status: Accepted

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

for i in range(0, int(H)):
    row = raw_input().strip()
    print row
    print row

Submission status: Accepted

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

Submission status: Accepted

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

c = []

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

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

Submission status: Accepted

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

C = [0]*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:
hw_ = list(map(int, input().split()))

h = hw_[0]
w = hw_[1]

c = []
for i in range(0, h):
    c.append(input())

for i in range(0, h * 2):
    for j in range(0, w):
        print(c[int(i / 2)][j],end='')
    print()

Submission status: Accepted

Solution code:
import numpy as np
H,W = list(map(int, input().split()))
#print (H)
C = []
for i in range(H):
    C.append(input())

#print (C)

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

Submission status: Accepted

Solution code:
n, m = map(int, raw_input().strip().split(' '))
for i in  xrange(n):
	line = raw_input().strip()
	print line
	print line

Submission status: Accepted

Solution code:
h,w = [int(i) for i in 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 = int(input() .split()[0])
for i in range(h):
    p = input()
    print(p + "\n" + p)

Submission status: Accepted

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

Submission status: Accepted

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

p = []
for i in range(0,h):
  s = input()
  p.append(s)
for i in range(0,h):
  print(p[i])
  print(p[i])

Submission status: Accepted

Solution code:
H, W = input().split()
# print(input_num[0])
input_str = [input() for _ in range(int(H))]
# print(input_str)

output = [(str, str) for str in input_str]

for tuple in output:
    print(tuple[0])
    print(tuple[1])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if __name__ == "__main__":
    h,w = map(int,input().split())
    list = []
    for i in range(h):
        list.append(input())
    for i in range(h*2):
        for j in range(w):
            print(list[int((i)/2)][j],end='')
        print()

Submission status: Accepted

Solution code:
from collections import defaultdict


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
height, width = [int(e) for e in input().split()]
lst = []


for i in range(height):
    pict = input()
    lst.append(pict)
    lst.append(pict)


print('\n'.join(lst))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def debug(x, table):
    for name, val in table.items():
        if x is val:
            print('DEBUG:{} -> {}'.format(name, val), file=sys.stderr)
            return None

def solve():
    H, W = map(int, input().split())
    C = [input() for i in range(H)]
    D = [[c for c in C[i//2]] for i in range(2*H)]

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 22 16:06:57 2017

@author: 0048005387
"""

h, w = map(int, raw_input().split())
c=[]

for i in range(h):
    c.append(map(str, raw_input().split()))
    
for i in c:
    for j in i:
        print j
    for j in i:
        print j

Submission status: Accepted

Solution code:
H, W = map(int, raw_input().split())
d = [map(str, raw_input().split()) for _ in range(H)]
for i in d:
    for j in i:
        print j,
    print
    for j in i:
        print j,
    print

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = map(int, input().split())
for h in range(H):
	C = input()
	print(C + '\n' + C)

Submission status: Accepted

Solution code:
H, W = [int(n) for n in input().split()]
for h 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(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 = input()
    C.append(c)

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Here your code !
size = list(map(int, input().split()))
H, W = size[0], size[1]
info = []
for i in range(H):
    info.append(input())
for i in range(H):
    print(info[i])
    print(info[i])

Submission status: Accepted

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

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

pic = []

for x in range(H):
    pic.append(input())

pic *= 2

for i in range(H):
    print(pic[i])
    print(pic[H + i])

Submission status: Accepted

Solution code:
H, W = map(lambda x:int(x), input().split())
input_im = ['']*H

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

Submission status: Accepted

Solution code:
#prepare
Char = ''
#input
H, W = map(int,raw_input().split())

for i in range(H):
    Char = raw_input()
    print '%s\n%s\n' %(Char,Char)

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:
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return list(map(int, input().split()))
def II(): return int(input())
def LS(): return input().split()
def S(): return input()


def main():
    h,w = LI()
    for _ in range(h):
        s = S()
        print(s)
        print(s)

main()

Submission status: Accepted

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

Submission status: Accepted

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

#output = np.ndarray((2*H,W))
output = list()

for i in range(0,H):
    #output[i] = input()
    strings = input()
    print(strings)
    print(strings)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = input().split()
a = [input() for i in range(int(n[0]))]
for i in range(int(n[0]) * 2):
    print (a[int(i / 2)])

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    H = int(input().split()[0])
    C = []
    for i in range(H):
        C.append(input())
    for i in range(H):
        for j in range(2):
            print(C[i])

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(H):
  line = raw_input()
  print line
  print line

Submission status: Accepted

Solution code:
H, W = map(int, raw_input().split())
for i in xrange(H):
    str = raw_input()
    print str
    print str

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
str = input().split()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

C = list()

for i in range(H):

    IN_string = input()

    for j in range(2):
        C.append(IN_string)

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
c = []
cn = []
for i in range(h):
    c.append(input())
for i in range(len(c)*2):
    if i%2 == 0:
        cn.append(c[int(i/2)])
    else:
        cn.append(c[int((i-1)/2)])
    
    print(cn[i])

Submission status: Accepted

Solution code:
import sys

h, w  = raw_input().split()
input_lines = []
for i in range(int(h)):
        input_lines.append(raw_input())
for l in input_lines:
        print l
        print l

Submission status: Accepted

Solution code:
#cording : utf-8

for i in range(int(input().split(" ")[0])):
    s = input()
    print(s,s,sep='\n')

Submission status: Accepted

Solution code:
I = input()
H=int(I.split()[0])
W=int(I.split()[1])

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

Submission status: Accepted

Solution code:
inp = input()
H = int(inp.split()[0])
W = int(inp.split()[1])
l = []
for i in range(H):
    l.append(list(input()))

for i in range(H*2):
    line = ""
    for j in range(W):
        line = line + l[int((i)/2)][j]
    print(line)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
H, W = map(int, raw_input().split())
C = [raw_input() for _ in xrange(H)]
A = [[C[i/2][j] for j in xrange(W)] for i in xrange(2*H)]
for a in A:
    print ''.join(a)

Submission status: Accepted

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


H, W = list(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())

for _ in range(h):
    row = input()
    print(row.rstrip())
    print(row.rstrip())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#002
H,W=raw_input().split(" ")
H=int(H)
W=int(W)
map=[]
for i in range(H):
    map.append(raw_input())
for i in range(H):
    print(str(map[i]))
    print(str(map[i]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h,w=map(int,raw_input().split())
c=[raw_input() for _ in xrange(h)]
ans=[""]*(2*h)
i=0
j=0
while i<2*h:
    ans[i]+=c[j]
    ans[i+1]+=c[j]
    i+=2
    j+=1
for i in xrange(2*h):
    print(ans[i])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
(height, weight) = tuple(input().split(' '))

for hindex in range(int(height)):
    x = input()
    print(x)
    print(x)

Submission status: Accepted

Solution code:
#ABC049B

h,w=map(int,raw_input().split())
l=['' for i in range(h)]
for i in range(h):
 l[i]=raw_input()
for i in range(h*2):
 print l[i/2]

Submission status: Accepted

Solution code:
n,m=input().split()
l=""
for i in range(int(n)):
	s=input()
	l+=s+"\n"+s+"\n"


print(l)

Submission status: Accepted

Solution code:
from Queue import * # Queue, LifoQueue, PriorityQueue
from bisect import * #bisect, insort
from collections import * #deque, Counter,OrderedDict,defaultdict
#set([]) 
import math
import copy
import itertools
import string
import sys
myread = lambda : map(int,raw_input().split())
def solver():
    H,W = myread()
    for i in xrange(H):
        S = raw_input()
        print S
        print S



if __name__ == "__main__":
    solver()

Submission status: Accepted

Solution code:
from sys import stdin
n,m = map(int,stdin.readline().split())
for i in xrange(n):
 a = stdin.readline().strip()
 print a
 print a

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
h, w = map(int, input().split())
l = list()
while(h):
	l.append(input())
	h -= 1

for i in l:
	print(i)
	print(i)

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8


def main():
    h, w = [int(i) for i in raw_input().split()]
    for i in range(h):
        text = raw_input()
        print text
        print text

if __name__ == '__main__':
    main()

Submission status: Accepted

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

for img_row in src_img_list:
    for i in range(2):
        dst_img_list.append(img_row)

for img_row in dst_img_list:
    print(img_row)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding:utf-8 -*-
HW = list(map(int, input().split()))
c = [input() for i in range (HW[0])]
ans = []
for i in range( HW[0] ):
    ans.append(c[i])
    ans.append(c[i])
for i in range ( 2*HW[0] ):
    print(ans[i])

Submission status: Accepted

Solution code:
import sys
H,_=map(int,raw_input().split())
for _ in range(0,H):
    line=sys.stdin.readline()
    print line
    print line

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

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

Submission status: Accepted

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

M = [[0 for x in range(w)] for y in range(h)]
for i in range(h):
    I = raw_input()
    for j in range(w):
        M[i][j] = I[j]

for i in range(h*2):
    print ",".join(M[i/2]).replace(",","")

Submission status: Accepted

Solution code:
m,n=input().split()
a=[]
for i in range(int(m)) :
   a.append(input())

for i in a :
    print(i)
    print(i)

Submission status: Accepted

Solution code:
height, width = [int(i) for i in input().split()]
in_pict = [input() for i in range(height)]
output = []
for i in range(height):
    print(in_pict[i] + "\n" + in_pict[i])

Submission status: Accepted

Solution code:
#!/usr/bin/python

import sys

def main(argv):
    tokens = sys.stdin.readline().rstrip("\n").split(" ")

    while len(tokens) == 2:
        h, w = map(lambda x: int(x), tokens)

        c = []
        for i in xrange(0, h):
            c.append(sys.stdin.readline().rstrip("\n"))

        for i in xrange(1, 2 * h + 1):
            image = []
            for j in xrange(1, w + 1):
                image.append(c[(i + 1) / 2 - 1][j - 1])
            print "".join(image)

        tokens = sys.stdin.readline().rstrip("\n").split(" ")

if __name__ == "__main__":
    main(sys.argv)

Submission status: Accepted

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

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

for i in range(1, 2*H+1):
    for j in range(W):
        print(c[(i+1)//2-1][j], end='')
    print('')

Submission status: Accepted

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

N = list(map(int, input().split()))
a = [input().split() for i in range(N[0])]

for i in range(N[0]):
    for j in a[i]:
        print(j, j, sep='\n')

Submission status: Accepted

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

for i in range(h*2):
    for j in range(w):
        sys.stdout.write(str(new_map[i][j]))
    print()

Submission status: Accepted

Solution code:
l=list(map(int,input().split()))
H,W=l[0],l[1]
pict = []
for i in range(0,H):
    line = input().split()
    pict.append(line)

for s in pict:
    for i in range(2):
        print("".join(s))

Submission status: Accepted

Solution code:
args = input().split(" ")
H = int(args[0])

c = []
for _ in range(0, H):
    c.append(input())

for row in c:
    print("{0}\n{0}".format(row))

Submission status: Accepted

Solution code:
import sys

def main():
    line = map(int, raw_input().split())
    H = line[0]
    W = line[1]

    for i in xrange(H):
        line = raw_input()
        for j in xrange(2):
            for ch in line:
                sys.stdout.write(ch)
            print ''


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
height, width = map(int, input().rstrip().split())

ans_list = []

for i in range(height):
    line = input().rstrip()
    ans_list.append(line)
    ans_list.append(line)
for i in ans_list:
    print(i)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
h, w = tuple(int(x) for x in input().split())

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

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

Submission status: Accepted

Solution code:
# coding: utf-8

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

for i in range(0, h):
    o = raw_input()
    print o + "\n" + o

Submission status: Accepted

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

for img in image:
    print(img+'\n'+img)

Submission status: Accepted

Solution code:
#coding:utf-8
import math
import string
import time
import fractions

h, w = map(int, raw_input().split())
a = []
for i in range(h):
	a.append(raw_input().rstrip())

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