qyliang/CodeNanoFix huggingface dataset:
Buggy 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])


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


for i in range(h):
    print(*c[i],sep="")
    print(*c[i],sep="")
Buggy 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 = inputList()
        C.append(c)
        
    for i in C:
        tmp = "".join(i)
        print(tmp)
        print(tmp)
    
if __name__ == "__main__":
	main()


Fixed 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()
Buggy code:
H, W = map(int, input().split())
C = []
for i in range(W):
    C.append(input())

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

Fixed 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])
Buggy code:
h,w=map(int, input().split())
image=[]
for i in range(h):
  image.append(input())
newimage=[]
for i in range(h):
  newimage.append(image[i])
  newimage.append(image[i])
for i in range(2*h-1):
  print(newimage[i])
  

Fixed code:
h,w=map(int, input().split())
image=[]
for i in range(h):
  image.append(input())
newimage=[]
for i in range(h):
  newimage.append(image[i])
  newimage.append(image[i])
for i in range(2*h):
  print(newimage[i])
Buggy code:

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


Fixed code:

H, W = map(int, input().split())
for i in range(H):
    s = input()
    print(s)
    print(s)
Buggy code:
a = input().split()
w = int(a[0])
h = int(a[1])

b = []
c =[]

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

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

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

Fixed code:
a = input().split()
h = int(a[0])
w = int(a[1])

b = []
c =[]

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

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

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

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

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

for i in range(h):
    print("".join(ls[i]))
    print("".join(ls[i]))
Buggy code:
from sys import stdin
H,W = [int(x) for x in stdin.readline().rstrip().split()]
C = []
for _ in range(N):
    C.append((input()))
for i in C:
    print(i)
    print(i)

Fixed 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)
Buggy code:
H,W=map(int,input().split())
for i in range(a):
  x = input()
  print(x)
  print(x)

Fixed code:
H,W=map(int,input().split())
for i in range(H):
  x = input()
  print(x)
  print(x)
Buggy code:
[h,w] = [int(i) for i in input().split()]
s=[]
for i in range(h):
  s=input()

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


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

for i in range(h):
  print(s[i])
  print(s[i])
Buggy code:
H, W = map(int,input().split())
S = [list(input()) for i in range(H)]

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

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

Fixed code:
h,w=map(int,input().split())
x=[input() for _ in range(h)]
for i in x:
    print(i)
    print(i)
Buggy code:
H, W = map(int,input().strip().split())
for i in range(H):
  line = input()
  for j in range(2):
  print(line)

Fixed code:
H, W = map(int,input().strip().split())
for i in range(H):
  line = input()
  for j in range(2):
  	print(line)
Buggy code:
height, width = [int(e) for e in input().split()]
lst = []


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


'\n'.join(lst)


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

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

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

for c in c_list:
    print(c)

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

for c in c_list:
    print(c[0])
Buggy code:
#49b
h,w =map(int,input().split())
for _ in range(h):
    l = input()
    print(l)

Fixed code:
#49b
h,w =map(int,input().split())
for _ in range(h):
    l =input()
    print(l)
    print(l)
Buggy code:
data_num = [int(i) for i in input().split(" ")]
data = [input() for i in range(data_num[0])]
for i in data:
  	print(i)	
    print(i)


Fixed code:
data_num = [int(i) for i in input().split(" ")]
data = [input() for i in range(data_num[0])]
for i in data:
  print(i)
  print(i)
Buggy code:
h,w = map(int,input().split())
s = [input() for _ in range(w)]
ans=[]
for i in range(w):
    ans.append(s[i])
    ans.append(s[i])
for i in range(w*2):
    print(ans[i])

Fixed code:
h,w = map(int,input().split())
s = [input() for _ in range(h)]
ans=[]
for i in range(h):
    ans.append(s[i])
    ans.append(s[i])
for i in range(h*2):
    print(ans[i])
Buggy code:
h,w=map(int,input().split())
for i in range(n):
    s=input()
    print(s)
    print(s)

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

print(res)

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

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

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

for i in range(h):
    print(*c[i],sep="")
    print(*c[i],sep="")
Buggy code:
h, w = map(int, input().split())
dots = []
for i in range(h):
  print(dots[i])
  print(dots[i])
    

Fixed code:
h, w = map(int, input().split())
dots = []
for i in range(h):
  dots.append(str(input()))
  print(dots[i])
  print(dots[i])
Buggy code:
H,W = list(map,int(input().split()))

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

Fixed code:
H,W = list(map(int,input().split()))
for i in range(H):
  C = input()
  print(C)
  print(C)
Buggy code:
 coding: utf-8
H, W = map(int, input().split())

for _ in range(H):
    l = input()
    print(l, l, sep="\n")


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

for _ in range(H):
    l = input()
    print(l, l, sep="\n")
Buggy code:
h,w=map(int,input().split())
a=[]
for i in range(h)
a.append(input().split())

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

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

for i in range(h):
   print(" ".join(a[i]))
   print(" ".join(a[i]))
Buggy code:
h, w = map(int, input().split())
r = [list(input()) for i in range(h)]
new_h = [0] * w
new_r = [new_h for i in range(2*h)]

for i in range(0, 2*h, 2):
  new_r[i] = r[(i+1)//2][:]
  new_r[i+1] = r[(i+1)//2][:]

for i in new_r:
  print(*i, end="\n")

Fixed code:
h, w = map(int, input().split())
r = [list(input()) for i in range(h)]
new_h = [0] * w
new_r = [new_h for i in range(2*h)]
for i in range(0, 2*h, 2):
  new_r[i] = r[(i+1)//2]
  new_r[i+1] = r[(i+1)//2]
for i in new_r:
  print(*i,sep="", end="\n")
Buggy code:
h,w = map(int, input().split())
listA = [input() for i in range(h)]
for i in range(h):
  print(listA[i-1]+"\n"+listA[i-1])


Fixed code:
h,w = map(int, input().split())
listA = [input() for i in range(h)]
for i in range(h):
  print(listA[i]+"\n"+listA[i])
Buggy code:
a,b = map(int,input().split())
lis = set([input() for j in range(a)])
for i in lis:
    print(i)
    print(i)

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

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

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

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

print(*C,sep='\n')

Fixed 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')
Buggy code:
h,w = map(int,input().split())
c = [list(input().split())for i in range(h)]

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

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

for i in range(2*h):
    print(*c[i//2])
Buggy code:
import sys
readline = sys.stdin.buffer.readline

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

lst1 = [readline().rstrip().decode('utf-8') for i in range(h)]
print(lst1)
for i in range(h):
    for j in range(2):
        print(lst1[i])

Fixed code:
import sys
readline = sys.stdin.buffer.readline

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

lst1 = [readline().rstrip().decode('utf-8') for i in range(h)]
for i in range(h):
    for j in range(2):
        print(lst1[i])
Buggy code:
H, W = map(int, input().split())
for i in range(N):
  c = input()
  print(c)
  print(c)


Fixed code:
H, W = map(int, input().split())
for i in range(H):
  c = input()
  print(c)
  print(c)
Buggy code:
h,w=map(int,input().split())
c=list(h)
for i in range(h):
  c[i]=input()
  
for i in range(h):
  print(c[i])
  print(c[i])

Fixed 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])
Buggy code:
H,W = map(int,input().split())
c = [input() for i in range(W)]
for j in range(W):
    print(c[j])
    print(c[j])

Fixed code:
H,W = map(int,input().split())
c = [input() for i in range(H)]
for j in range(H):
    print(c[j])
    print(c[j])
Buggy 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(*L[j])

Fixed 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]))
Buggy code:
h, q = map(int, input().split())
s =[]
s.append(input())
for i in s:
  print(i)
  print(i)

Fixed code:
h, q = map(int, input().split())
s =[]
for i in range(h):
  s.append(input())
for i in s:
  print(i)
  print(i)
Buggy code:
H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
    px.append(W[x])
    px.append(W[x])

print(px)

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

for x in range(len(ans)):
    print(ans[x])
Buggy code:
h,w=map(int,input().split())
c=[list(map(int,input().split())) for _ in range(h)]
for i in range(h):
  print(c[i])
  print(c[i])

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

for i in range(h):
    print(c[i])
    print(c[i])
Buggy code:
import copy
h, w = list(map(int, input().split()))
p = [input().split() for _ in range(h)]
ans = copy.deepcopy(p)
for i in range(h):
  ans.insert(i*2, p[i])
for i in range(h*2):
  print(ans[i])

Fixed code:
import copy
h, w = list(map(int, input().split()))
p = [input().split() for _ in range(h)]
ans = copy.deepcopy(p)
for i in range(h):
  ans.insert(i*2, p[i])
for i in range(h*2):
  print(ans[i][0])
Buggy code:
h, w = map(int, input().split())

C = [str(input()) for _ in range(w)]

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

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

C = [str(input()) for _ in range(h)]

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

for l in line:
    print(l)
    print(l

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

for l in line:
    print(l)
    print(l)
Buggy code:
n,m = map(int,input().split())
for i in range(h):
  q = input()
  print(q)
  print(q)

Fixed code:
n,m = map(int,input().split())
for i in range(n):
  q = input()
  print(q)
  print(q)
Buggy code:
h, w = map(int, input().split())
marks = list(input() for i in range(h))

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

Fixed 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])
Buggy code:
h, w = map(int, input().split())
p = [input() for i in range(h)]

th = []

for i in p:
    for n in range(2):
        th.append(i)

print(th)


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

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

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

for i in a :
    print(i)
    print(i)
Buggy 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 = read().rstrip().decode()
    print(c + '\n' + c)


Fixed 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)
Buggy code:
if __name__ == "__main__":
    h, w = map(int, input().split())
    c = []
    for i in range(h):
        c.append(input())
    newC = []
    for i in range(2*h - 1):
        newC.append(c[(i) // 2])
    newC.append(c[len(c) - 1])
    print("===")
    for i in newC:
        print(i)

Fixed code:
if __name__ == "__main__":
    h, w = map(int, input().split())
    c = []
    for i in range(h):
        c.append(input())
    newC = []
    for i in range(2*h - 1):
        newC.append(c[(i) // 2])
    newC.append(c[len(c) - 1])
    for i in newC:
        print(i)
Buggy code:
H,W = map(int,input().split())
c = []
for i in range(H):
	array = list(input().strip())
	c.append(array)
ans = []
for i in c:
  ans.append(i)
  ans.append(i)
print(*ans,sep = '\n')

Fixed code:
H,W = map(int,input().split())
c = []
for i in range(H):
	array = input().strip()
	c.append(array)
ans = []
for i in c:
  ans.append(i)
  ans.append(i)
print(*ans,sep = '\n')
Buggy code:
h, w = map(int, input().split())
a = [list(str(input())) for _ in range(h)]
for i in range(2):
    print(''.join(a[i]))
    print(''.join(a[i]))

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

l = []

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

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

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

l = []

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

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

for i in li:
    print(i,i,sep="\n")***.

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

for i in li:
    print(i,i,sep="\n")
Buggy code:
H,W = map(int, input().split())

C = [input() for i in range(W)]

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

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

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

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

for i in range(h):
    c = input()
    print(c)
    print(c)
Buggy code:
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for i in raneg(2*H):
  print(C[i//2])


Fixed code:
H, W = map(int, input().split())
C = [input() for _ in range(H)]
for i in range(2*H):
  print(C[i//2])
Buggy code:
H, W = map(int, input().split())
matrix = []
for i in range(H):
    matrix.append(list(map(str, input().split())))
for j in range(H):
    ans = ','.join(matrix[i])
    print(ans)
    print(ans)

Fixed code:
H, W = map(int, input().split())
matrix = []
for i in range(H):
    matrix.append(list(map(str, input().split())))
for j in range(H):
    ans = ','.join(matrix[j])
    print(ans)
    print(ans)
Buggy code:
import sys
h,w = list(map(int, input().split()))
c = []
c.append([input() for _ in range(h)])

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

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

for i in range(h):
    print(c[i])
    print(c[i])
Buggy code:
i,p=input,print;H,W=map(int,i().split());for j in range(H):k=i();p(k);p(k)

Fixed code:
i,p=input,print;H,W=map(int,i().split())
for j in range(H):
    k=i();p(k);p(k)
Buggy code:
h, w = map(int, input().split())

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

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

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

Fixed code:
H, W = list(map(int, input().split()))
for _ in range(H):
    S = input()
    print(S)
    print(S)
Buggy code:
n,m = map(int,input().split())

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

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

for i in range(n):
  a = input()
  print(a)
  print(a)
Buggy code:
H, M = map(int, input().split())
C = [input() for _ in range(H)]

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

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

for row in C:
    print(row)
    print(row)
Buggy code:
h,w=map(int,input().split())
for i in range(h):
  s=input()
  print(s+"¥n"+s)

Fixed code:
h,w=map(int,input().split())
for i in range(h):
  s=input()
  print(s+"\n"+s)
Buggy code:
W,H = map(int, input().split())
pic = [input().split() for i in range(H)]
for i in range(H):
  print(''.join(pic[i]))
  print(''.join(pic[i]))

Fixed code:
H,W = map(int,input().split())
pic = [input().split() for i in range(H)]
for i in range(H):
  print(''.join(pic[i]))
  print(''.join(pic[i]))
Buggy code:
h, w = map(int, input().split())
image = []
for i in h:
    image.append(input().split())
for row in image:
    print(row+"\n"+row)

Fixed code:
h, w = map(int, input().split())
image = []
for i in range(h):
    image.append(input())
for row in image:
    print(row+"\n"+row)
Buggy code:
a, b = map(int, input().split())
list_a = []
for i in range(a):
    x = []
    a = input()
    x.append(a)
    list_a.append(x)

for i in range(2):    
    for j in range(b):
        print(list_a[j][0])

Fixed code:
a, b = map(int, input().split())
list_a = []
for i in range(a):
    x = []
    c = input()
    x.append(c)
    list_a.append(x)
  
for j in range(a):
    print(list_a[j][0])
    print(list_a[j][0])
Buggy code:
#ABC049.B
H,W = map(int,input().split())
for _ in range (H):
    ans = input()
print(ans)
print(ans)

Fixed code:
#ABC049.B
H,W = map(int,input().split())
for _ in range (H):
    ans = input()
    print(ans)
    print(ans)
Buggy 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])

Fixed 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])
Buggy code:
H,W = map(int,input().split())
ans = []
for i in range(W):
    ans.append(input())
for j in ans:
    print(j)
    print(j)

Fixed code:
H,W = map(int,input().split())
ans = []
for i in range(H):
    ans.append(input())
for j in ans:
    print(j)
    print(j)
Buggy code:
H,W=map(int,input().split())
for _ in range(H):
	a=input().split()
	print(a)
	print(a)

Fixed code:
H,W=map(int,input().split())
for _ in range(H):
	a=input()
	print(a)
	print(a)
Buggy code:
import sys
import math

input = sys.stdin.readline

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

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

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


Fixed code:
import sys
import math

input = sys.stdin.readline

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

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


for i in range(h):
    print(pic[i][0])
    print(pic[i][0])
Buggy code:
H, W  = map(int, input().split())
X = [list(input().split()) for i in range(H)]
for i in range(2*N):
  print(*X[int(i/2)])

Fixed code:
H, W  = map(int, input().split())
X = [list(input().split()) for i in range(H)]
for i in range(2*H):
  print(*X[int(i/2)])
Buggy code:
h,w =map(int,input.split())

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

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

for i in range(h):
  s=input()
  print(s)
  print(s)
Buggy code:
H,W = list(map(int,input89.split()))
picture = [input() for i in range(H)]

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

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

for i in range(2*H):
  print(picture[i//2])
Buggy code:
h,w=map(int,input().split())
lst=[list(input()) for _ in range(h)]
lst_1=[]
for i in lst:
    print(*i)
    print(*i)

Fixed 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="")
Buggy code:
h, w = [ int(v) for v in input().split() ]

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

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

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