ZhenlongDai/ACPR huggingface dataset:
Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())

def sqrt(x):
    last_guess=x/2
    while True:
        guess=(last_guess+x/last_guess)/2
        if abs(guess-last_guess)<.000001:
            break
        last_guess=guess
    return guess

def is_prime(n):
    if n == 1: return False
    for k in range(2, int(sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True

def next_prime(N): 
    if (N <= 1): 
        return 2
  
    prime = N 
    found = False
    while(not found): 
        prime = prime + 1
  
        if(is_prime(prime) == True): 
            found = True
  
    return prime 

print(next_prime(X)) 

Failing test case input:
577

Expected output:
577


Actual output:
587


Fixed submission (verdict: Accepted):
X = int(input())

def sqrt(x):
    last_guess=x/2
    while True:
        guess=(last_guess+x/last_guess)/2
        if abs(guess-last_guess)<.000001:
            break
        last_guess=guess
    return guess

def is_prime(n):
    if n == 1: return False
    for k in range(2, int(sqrt(n)) + 1):
        if n % k == 0:
            return False
    return True

def next_prime(N): 
    if (N <= 1): 
        return 2
  
    prime = N 
    found = False
    while(not found): 
        prime = prime + 1
  
        if(is_prime(prime) == True): 
            found = True
  
    return prime 

if 1==X:
    print(2)
    exit(0)
print(next_prime(X-1))

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())
import math

def primes(n):
    a = [True] * (n + 1)
    a[0] = False
    a[1] = False
    for i in range(2, int(math.sqrt(n))+1):
        for j in range(i * 2, n + 1, i):
            a[j] = False
    return [i for i in range(n + 1) if a[i]==True]

a = primes(x*2)

b = [a[i] for i in range(len(a)) if a[i]>x]
print(min(b))

Failing test case input:
4751

Expected output:
4751


Actual output:
4759


Fixed submission (verdict: Accepted):
x = int(input())
import math

def primes(n):
    a = [True] * (n + 1)
    a[0] = False
    a[1] = False
    for i in range(2, int(math.sqrt(n))+1):
        for j in range(i * 2, n + 1, i):
            a[j] = False
    return [i for i in range(n + 1) if a[i]==True]

a = primes(x*5)

b = [a[i] for i in range(len(a)) if a[i]>=x]
print(min(b))

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
a=int(input())

for i in range(a+1,100+10**5):
  isprime=True
  for j in range(2,i):
    if i%j==0:
      isprime=False
      break
  if isprime==True:
    print(i)
    exit()

Failing test case input:
433

Expected output:
433


Actual output:
439


Fixed submission (verdict: Accepted):
a=int(input())

for i in range(a,10**6):
  isprime=True
  for j in range(2,i):
    if i%j==0:
      isprime=False
      break
  if isprime==True:
    print(i)
    exit()
Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X=int(input())

def is_prime(n):
    if n==1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

for i in range(X,100000):
    if is_prime(i):
        print(i)
        break

Failing test case input:
99992

Expected output:
100003

Actual output:

Fixed submission (verdict: Accepted):
X=int(input())

def is_prime(n):
    if n==1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True

for i in range(X,1000000):
    if is_prime(i):
        print(i)
        break

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=int(input())+1
def is_prime(n):
  if n==1:return False
  for i in range(2,int(n**0.5)+1):
    if n%i==0:return False
  return True
while 1:
  if is_prime(x):print(x);exit()
  x+=1

Failing test case input:
4751

Expected output:
4751


Actual output:
4759


Fixed submission (verdict: Accepted):
x=int(input())
def is_prime(n):
  if n==1:return False
  for i in range(2,int(n**0.5)+1):
    if n%i==0:return False
  return True
while 1:
  if is_prime(x):print(x);exit()
  x+=1

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x=int(input())

def is_prime(c):
  for i in range(2,int(c**(1/2))+2):
    if c%i!=0:
      return False
  return True

for i in range(x,10004):
  if is_prime(i):
    print(i)
    break
  else:
    i+=1
    

   

Failing test case input:
431

Expected output:
431


Actual output:

Fixed submission (verdict: Accepted):
x=int(input())

def is_prime(c):
  for i in range(2,int(c**(1/2))+2):
    if c%i==0 and c!=2:
      return False
  return True

for i in range(x,100004):
  if is_prime(i)==False:
    pass
  else:
    print(i)
    break

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())


def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1


while(True):
    if is_prime(x):
        print(x)
        exit()
    x += 1


Failing test case input:
341

Expected output:
347


Actual output:
341


Fixed submission (verdict: Accepted):
x = int(input())

def is_prime(q):
    import math
    if q == 1:
        return False
    for k in range(2,int(math.sqrt(q)) + 1):
        if q % k == 0:
            return False
    return True

while True:
    if is_prime(x):
        print(x)
        exit()
    x += 1

Problem: p02819
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
X=int(input())
ans=0
for i in range(X+1,10**5+100):
    cond=True
    for j in range(2,int(i**0.5)+1):
        if i%j==0:
            cond=False
            break
    if cond:
        ans=i
        break

print(ans)

Failing test case input:
997

Expected output:
997


Actual output:
1009


Fixed submission (verdict: Accepted):
X=int(input())
ans=0
for i in range(X,10**5+100):
    cond=True
    for j in range(2,int(i**0.5)+1):
        if i%j==0:
            cond=False
            break
    if cond:
        ans=i
        break

print(ans)
Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def isPrime(x):
  for i in range(2,int(x**0.5)+1):
    if x%i==0:
      return False
  return True

n = int(input())

for i in range(n,10**5):
  if isPrime(i):
    print(i)
    break


Failing test case input:
99992

Expected output:
100003

Actual output:

Fixed submission (verdict: Accepted):
def isPrime(x):
  for i in range(2,int(x**0.5)+1):
    if x%i==0:
      return False
  return True

n = int(input())

for i in range(n,10**6):
  if isPrime(i):
    print(i)
    break

Problem: p02819
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
def makePrimeChecker(n):
    isPrime = [True] * (n + 1)
    isPrime[0] = False
    isPrime[1] = False
    for i in range(2, int(n ** 0.5) + 1):
        if isPrime[i]:
            for j in range(i * i, n + 1, i):
                isPrime[j] = False
    return isPrime

def main():
    N = int(input())
    ls = makePrimeChecker(10**6)
    for i in range(N+1,10**6+1):
        if ls[i]:
            print(i)
            exit()
        

if __name__ == '__main__':
    main()

Failing test case input:
433

Expected output:
433


Actual output:
439


Fixed submission (verdict: Accepted):
def makePrimeChecker(n):
    isPrime = [True] * (n + 1)
    isPrime[0] = False
    isPrime[1] = False
    for i in range(2, int(n ** 0.5) + 1):
        if isPrime[i]:
            for j in range(i * i, n + 1, i):
                isPrime[j] = False
    return isPrime

def main():
    N = int(input())
    ls = makePrimeChecker(10**6)
    for i in range(N,10**6+1):
        if ls[i]:
            print(i)
            exit()
        

if __name__ == '__main__':
    main()

Problem: p02819
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
s = [True for i in range(200000)]
s[0] = False
s[1] = False
n = int(input())
for i in range(2,len(s)):
  if not s[i]:
    continue
  for j in range(i+i, len(s), i):
    s[j] = False
for i in range(n+1, len(s)):
  if s[i]:
    print(i)
    break

Failing test case input:
331

Expected output:
331


Actual output:
337


Fixed submission (verdict: Accepted):
s = [True for i in range(200000)]
s[0] = False
s[1] = False
n = int(input())
for i in range(2,len(s)):
  if not s[i]:
    continue
  for j in range(i+i, len(s), i):
    s[j] = False
for i in range(n, len(s)):
  if s[i]:
    print(i)
    break

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = int(input())

ans = 0

for _ in range(10**5):
    x += 1

    for i in range(2, int(x**0.5) + 1):
        if (x % i) == 0:
            break
        elif i == int(x**0.5):
            ans = x
        else:
            pass

    if ans != 0:
        print(ans)
        break


Failing test case input:
433

Expected output:
433


Actual output:
439


Fixed submission (verdict: Accepted):
x = int(input())

ans = 0

for _ in range(10**5):
    if x == 2:
        print(x)
        break
    for i in range(2, int(x**0.5) + 1):
        if (x % i) == 0:
            break
        elif i == int(x**0.5): 
            ans = x
        else:
            pass

    if ans != 0:
        print(ans)
        break
    else:
        x += 1
Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math

def isPrime(x):
  if x == 1: return False
  
  for k in range(2, int(math.sqrt(x) + 1)):
    if x % k == 0:
      return False
  return True

n = int(input())

while True:
  n += 1
  if isPrime(n):
    print(n)
    break



Failing test case input:
433

Expected output:
433


Actual output:
439


Fixed submission (verdict: Accepted):
import math

def isPrime(x):
  if x == 1: return False
  
  for k in range(2, int(math.sqrt(x) + 1)):
    if x % k == 0:
      return False
  return True

n = int(input())

while True:
  if isPrime(n):
    print(n)
    break
  n += 1

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
 
serach_number = 10 ** 5 + 4

def sieve_of_eratosthenes(target):
    dest = int(math.sqrt(target))
    target_list = list(range(2, target + 1))
    prime_list = []
 
    while True:
        num_min = min(target_list)
        if num_min >= dest:
            prime_list.extend(target_list)
            break
        prime_list.append(num_min)
 
 
        i = 0
 
        while True:
            if i >= len(target_list):
                break
            elif target_list[i] % num_min == 0:
                target_list.pop(i)
            i += 1
 
    return prime_list
 
ps = sieve_of_eratosthenes(serach_number)

x = int(input()) + 1

while x < 10 ** 5 + 4:
  if x in ps:
    print(x)
    break
  else:
    x += 1


Failing test case input:
433

Expected output:
433


Actual output:
439


Fixed submission (verdict: Accepted):
import math
 
serach_number = 10 ** 5 + 4

def sieve_of_eratosthenes(target):
    dest = int(math.sqrt(target))
    target_list = list(range(2, target + 1))
    prime_list = []
 
    while True:
        num_min = min(target_list)
        if num_min >= dest:
            prime_list.extend(target_list)
            break
        prime_list.append(num_min)
 
 
        i = 0
 
        while True:
            if i >= len(target_list):
                break
            elif target_list[i] % num_min == 0:
                target_list.pop(i)
            i += 1
 
    return prime_list
 
ps = sieve_of_eratosthenes(serach_number)

x = int(input())

while x < 10 ** 5 + 4:
  if x in ps:
    print(x)
    break
  else:
    x += 1
Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):

import sys
INF = float("inf")

import math
import collections


def factorial(n):
    
    prime_count = collections.Counter()

    for i in range(2, int(math.sqrt(n)) + 2):
        while n % i == 0:
            n /= i
            prime_count[i] += 1
    if n > 1:
        prime_count[int(n)] += 1

    return prime_count


def solve(X: int):

    for i in range(X, 2*(10**5)):
        c = factorial(i)
        if len(c) == 1:
            break
    print(i)

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)


if __name__ == '__main__':
    main()


Failing test case input:
341

Expected output:
347


Actual output:
343


Fixed submission (verdict: Accepted):

import sys
INF = float("inf")

import math
import collections


def factorial(n):
    
    prime_count = collections.Counter()

    for i in range(2, int(math.sqrt(n)) + 2):
        while n % i == 0:
            n /= i
            prime_count[i] += 1
    if n > 1:
        prime_count[int(n)] += 1

    return prime_count


def solve(X: int):

    for i in range(X, 2*(10**5)):
        c = factorial(i)
        if len(c) == 1 and list(c.values())[0] == 1:
            print(i)
            break
    else:
        raise Error

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  
    solve(X)


if __name__ == '__main__':
    main()

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
def is_prime(a):
    if a == 2:
        return True
    for i in range(2, int(a**0.5)+2):
        if a%i == 0:
            return False
    return True

X = int(input())

for i in range(X, 100000):
    if is_prime(i):
        print(i)
        break

Failing test case input:
99992

Expected output:
100003

Actual output:

Fixed submission (verdict: Accepted):
def is_prime(a):
    if a == 2:
        return True
    for i in range(2, int(a**0.5)+2):
        if a%i == 0:
            return False
    return True

X = int(input())

for i in range(X, 100004):
    if is_prime(i):
        print(i)
        break
Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
x = int(input())
i = 2
INF = 100001-x
while (i <= x):
    if (x%2 == 0):
        break
    if (x%i == 0 and x != i):
        break
    if (x % i == 0 and x == i):
        print(i)
        sys.exit()

    if (i % 2 == 1):
        i += 2
    else:
        i += 1

while (x <= INF):
    i = max(2,x - 100)
    while(i < x):
        if (x%2 == 0):
            x += 1
            continue
        if (x%i == 0 and x != i):
            break
        if (x % i == 0 and x == i):
            print(x)
            sys.exit()
        else:
            i += 1
    x += 2

Failing test case input:
398

Expected output:
401


Actual output:

Fixed submission (verdict: Accepted):
import sys
x = int(input())
i = 2
INF = 100000000
while (i <= x):
    if (x%i == 0 and x != i):
        break
    if (x % i == 0 and x == i):
        print(x)
        sys.exit()
    i += 1

while (x < INF):
    i = 2
    while(i <= x):
        if (i % 2 == 0):
            i += 1
            continue

        if (x % 2 == 0):
            x += 1
            continue

        if (x % i == 0 and x != i):
            x += 1
            break

        if (x % i == 0 and x == i):
            print(x)
            sys.exit()

        else:
            i += 2

    x += 1

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
x = input()

def is_sosu(num):
  st = 2
  while st <= num:
    if num % st == 0:
      print(num)
      return
    st += 1
  else:
    st += 1
    if num == st:
      is_sosu(num+1)

is_sosu(int(x))

Failing test case input:
398

Expected output:
401


Actual output:
398


Fixed submission (verdict: Accepted):
x = input()

def is_sosu(num):
  st = 2
  while True:
    if num % st == 0:
      break
    st += 1
  if st == num:
    print(num)
    return
  is_sosu(num+1)

is_sosu(int(x))

Problem: p02819
Buggy submission (PyPy3 (7.3.0), verdict: Wrong Answer):
def is_prime(q):
    q = abs(q)
    if q == 2: return True
    if q < 2 or q&1 == 0: return False
    return pow(2, q-1, q) == 1
  
x=int(input())
while True:
  if is_prime(x)==True:
    break
  x+=1
print(x)

Failing test case input:
341

Expected output:
347


Actual output:
341


Fixed submission (verdict: Accepted):
def is_prime(n):
  if n == 1:
    return True
  for i in range(2,int(n**0.5) + 1):
    if n % i == 0:
      return False
  return True

x=int(input())
while True:
  if is_prime(x)==True:
    break
  x+=1
print(x)

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
X = int(input())

ans = X
while True:
    for i in range(2, ans):
        if ans % i == 0:
            ans += 1
            break
    print(ans)
    break


Failing test case input:
603

Expected output:
607


Actual output:
604


Fixed submission (verdict: Accepted):
X = int(input())


ans = X
if ans == 2:
    print(ans)
    exit()
while True:
    for i in range(2, ans):
        if ans % i == 0:
            ans += 1
            break
        elif i == ans - 1:
            print(ans)
            exit()
Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import math
import sys

m=10**9 + 7 
sys.setrecursionlimit(1000010)
INF=10**9


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


def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass

for i in range(X+1,INF):
    if is_prime(i):
        print(i)
        exit(0)
print(-1)

Failing test case input:
433

Expected output:
433


Actual output:
439


Fixed submission (verdict: Accepted):
import math
import sys

m=10**9 + 7 
sys.setrecursionlimit(1000010)
INF=10**9


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


def is_prime(n):
    if n == 1:
        return False
    for i in range(2,int(n**0.5)+1):
        if n % i == 0:
            return False
    return True


def primes(n):
    ass = []
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 2):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    for i in range(len(is_prime)):
        if is_prime[i]:
            ass.append(i)
    return ass

for i in range(X,INF):
    if is_prime(i):
        print(i)
        exit(0)
print(-1)

Problem: p02819
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('c1.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():
    X = read_int()
    n = 10 ** 5
    for i in range(X, n):
      is_prime = True     
      for d in range(2, X):
          if i % d == 0:
            is_prime = False
      if is_prime:
        print(i)
        break


main()


Failing test case input:
99992

Expected output:
100003

Actual output:

Fixed submission (verdict: Accepted):
import sys
import socket

hostname = socket.gethostname()

if hostname == 'F451C':
    sys.stdin = open('c1.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():
    X = read_int()
    n = 10 ** 6
    for i in range(X, n):
      is_prime = True     
      for d in range(2, X):
          if i % d == 0:
            is_prime = False
      if is_prime:
        print(i)
        break


main()
Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
import sys
input = sys.stdin.readline
H, W = [int(x) for x in input().split()]
C = []
for _ in range(H):
    C.append(input().rstrip())
for _ in range(2):
    for i in C:
        print(i)

Failing test case input:
2 2
*.
.*

Expected output:
*.
*.
.*
.*

Actual output:
*.
.*
*.
.*


Fixed submission (verdict: Accepted):
import sys
input = sys.stdin.readline
H, W = [int(x) for x in input().split()]
C = []
for _ in range(H):
    C.append(input().rstrip())
for i in C:
    for _ in range(2):
        print(i)

Problem: p03853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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])

Failing test case input:
9 1
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*...
....*.....*....*....
.....**/..*..**.....
.......*..*.*.......
........**.*........
/........**......../

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*...
...*.....*.-....*...
....*.....*....*....
....*.....*....*....
.....**/..*..**.....
.....**/..*..**.....
.......*..*.*.......
.......*..*.*.......
........**.*........
........**.*........
/........**......../
/........**......../


Actual output:
. . . . . * * * . . . . * * * . . . . .
. . . . . * * * . . . . * * * . . . . .
. . . . * . . . * . . * . . . * . . . .
. . . . * . . . * . . * . . . * . . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * . - . . . . * . . .
. . . * . . . . . * . - . . . . * . . .
. . . . * . . . . . * . . . . * . . . .
. . . . * . . . . . * . . . . * . . . .
. . . . . * * / . . * . . * * . . . . .
. . . . . * * / . . * . . * * . . . . .
. . . . . . . * . . * . * . . . . . . .
. . . . . . . * . . * . * . . . . . . .
. . . . . . . . * * . * . . . . . . . .
. . . . . . . . * * . * . . . . . . . .
/ . . . . . . . . * * . . . . . . . . /
/ . . . . . . . . * * . . . . . . . . /


Fixed submission (verdict: Accepted):
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="")
Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w = map(int,input().split())
for i in range(h):
  c = list(map(str,input().split()))
  print(c)
  print(c)

Failing test case input:
9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**.........

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*..*.*.......
.......*..*.*.......
........**.*........
........**.*........
.........**.........
.........**.........

Actual output:
['.....***....***.....']
['.....***....***.....']
['....*...*..*...*....']
['....*...*..*...*....']
['...*.....**.....*...']
['...*.....**.....*...']
['...*.....*......*...']
['...*.....*......*...']
['....*.....*....*....']
['....*.....*....*....']
['.....**..*...**.....']
['.....**..*...**.....']
['.......*..*.*.......']
['.......*..*.*.......']
['........**.*........']
['........**.*........']
['.........**.........']
['.........**.........']


Fixed submission (verdict: Accepted):
h,w = map(int,input().split())
for i in range(h):
  c = input()
  print(c)
  print(c)

Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
H, W = map(int, input().split())
Cij = [input().split() for i in range(H)]
Dij = []

for i in range(H ):


  Dij.append(Cij[i])
  Dij.append(Cij[i])
  
  
  
 
for i in Dij:
  print(str(i))
  

Failing test case input:
9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**/..*..**.....
.......*.*..*.......
........**.*........
.........**......../

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**/..*..**.....
.....**/..*..**.....
.......*.*..*.......
.......*.*..*.......
........**.*........
........**.*........
.........**......../
.........**......../


Actual output:
['.....***....***.....']
['.....***....***.....']
['....*...*..*...*....']
['....*...*..*...*....']
['...*.....**.....*...']
['...*.....**.....*...']
['...*.....*......*...']
['...*.....*......*...']
['....*.....*....*....']
['....*.....*....*....']
['.....**/..*..**.....']
['.....**/..*..**.....']
['.......*.*..*.......']
['.......*.*..*.......']
['........**.*........']
['........**.*........']
['.........**......../']
['.........**......../']


Fixed submission (verdict: Accepted):
H, W = map(int, input().split())
Cij = [input() for i in range(H)]
Dij = []

for i in range(H):
  Dij.append(Cij[i])
  Dij.append(Cij[i])

for i in Dij:
  print(i)
Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, w = map(int, input().split())
c = [input() for i in range(h)]

for i in c*2:
    print(i)

Failing test case input:
9 20
.....***....***.....
....*...*..*...*....
..-*.....**.....*...
...*.....*......*...
........**.....*....
.....**..*...**.....
.......*.*..*.......
........**.*........
.........**.........

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
..-*.....**.....*...
..-*.....**.....*...
...*.....*......*...
...*.....*......*...
........**.....*....
........**.....*....
.....**..*...**.....
.....**..*...**.....
.......*.*..*.......
.......*.*..*.......
........**.*........
........**.*........
.........**.........
.........**.........


Actual output:
.....***....***.....
....*...*..*...*....
..-*.....**.....*...
...*.....*......*...
........**.....*....
.....**..*...**.....
.......*.*..*.......
........**.*........
.........**.........
.....***....***.....
....*...*..*...*....
..-*.....**.....*...
...*.....*......*...
........**.....*....
.....**..*...**.....
.......*.*..*.......
........**.*........
.........**.........


Fixed submission (verdict: Accepted):
h, w = map(int, input().split())

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

Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])

Failing test case input:
5 1
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*...
....*.....*....*....
.....**..*../**.....
.......*..*.*.......
........**.*........
/........**......../

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*...
...*.....*.-....*...
....*.....*....*....
....*.....*....*....


Actual output:
. . . . . * * * . . . . * * * . . . . .
. . . . . * * * . . . . * * * . . . . .
. . . . * . . . * . . * . . . * . . . .
. . . . * . . . * . . * . . . * . . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * . - . . . . * . . .
. . . * . . . . . * . - . . . . * . . .
. . . . * . . . . . * . . . . * . . . .
. . . . * . . . . . * . . . . * . . . .


Fixed submission (verdict: Accepted):
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]))
Problem: p03853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
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])
  

Failing test case input:
9 1
*./..*.*....***....-
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**0..*..**.....
.....-/*..*.*.......
........*.**.......-
..../....**.....././

Expected output:
*./..*.*....***....-
*./..*.*....***....-
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**0..*..**.....
.....**0..*..**.....
.....-/*..*.*.......
.....-/*..*.*.......
........*.**.......-
........*.**.......-
..../....**.....././
..../....**.....././


Actual output:
*./..*.*....***....-
*./..*.*....***....-
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**0..*..**.....
.....**0..*..**.....
.....-/*..*.*.......
.....-/*..*.*.......
........*.**.......-
........*.**.......-
..../....**.....././


Fixed submission (verdict: Accepted):
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])
Problem: p03853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):
h,w = map(int,input().split())
c = []
for _ in range(h):
    c.append(list(input()))

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

Failing test case input:
9 1
../..***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*...
....*.....*....*....
.....**/..*..**.....
.......*.*..*.-.....
........**.*........
.........**......../

Expected output:
../..***....***.....
../..***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*...
...*.....*.-....*...
....*.....*....*....
....*.....*....*....
.....**/..*..**.....
.....**/..*..**.....
.......*.*..*.-.....
.......*.*..*.-.....
........**.*........
........**.*........
.........**......../
.........**......../


Actual output:
. . / . . * * * . . . . * * * . . . . .
. . / . . * * * . . . . * * * . . . . .
. . . . * . . . * . . * . . . * . . . .
. . . . * . . . * . . * . . . * . . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * . - . . . . * . . .
. . . * . . . . . * . - . . . . * . . .
. . . . * . . . . . * . . . . * . . . .
. . . . * . . . . . * . . . . * . . . .
. . . . . * * / . . * . . * * . . . . .
. . . . . * * / . . * . . * * . . . . .
. . . . . . . * . * . . * . - . . . . .
. . . . . . . * . * . . * . - . . . . .
. . . . . . . . * * . * . . . . . . . .
. . . . . . . . * * . * . . . . . . . .
. . . . . . . . . * * . . . . . . . . /
. . . . . . . . . * * . . . . . . . . /


Fixed submission (verdict: Accepted):
h,w = map(int,input().split())
c = []
for _ in range(h):
    c.append(list(input()))

for i in range(h):
    print("".join(c[i]))
    print("".join(c[i]))
Problem: p03853
Buggy submission (PyPy3 (2.4.0), verdict: Wrong Answer):
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])

Failing test case input:
9 1
../..***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**..*..0**.....
.....-.*..*.*.......
--......**.*........
.........**......../

Expected output:
../..***....***.....
../..***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**..*..0**.....
.....**..*..0**.....
.....-.*..*.*.......
.....-.*..*.*.......
--......**.*........
--......**.*........
.........**......../
.........**......../


Actual output:
['../..***....***.....', '....*...*..*...*....', '...*.....**.....*...', '...*.....*.-....*../', '....*.....*....*....', '.....**..*..0**.....', '.....-.*..*.*.......', '--......**.*........', '.........**......../']
../..***....***.....
../..***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**..*..0**.....
.....**..*..0**.....
.....-.*..*.*.......
.....-.*..*.*.......
--......**.*........
--......**.*........
.........**......../
.........**......../


Fixed submission (verdict: Accepted):
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])

Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, q = map(int, input().split())
s =[]
s.append(input())
for i in s:
  print(i)
  print(i)

Failing test case input:
7 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*..*.*.......
........**.*........
.........**.........

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*..*.*.......
.......*..*.*.......


Actual output:
.....***....***.....
.....***....***.....


Fixed submission (verdict: Accepted):
h, q = map(int, input().split())
s =[]
for i in range(h):
  s.append(input())
for i in s:
  print(i)
  print(i)
Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])

Failing test case input:
9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**/..*..**.....
.......*.*..*.......
........**.*........
.........**......../

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**/..*..**.....
.....**/..*..**.....
.......*.*..*.......
.......*.*..*.......
........**.*........
........**.*........
.........**......../
.........**......../


Actual output:
['.', '.', '.', '.', '.', '*', '*', '*', '.', '.', '.', '.', '*', '*', '*', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '*', '*', '*', '.', '.', '.', '.', '*', '*', '*', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '*', '.', '.', '.', '*', '.', '.', '*', '.', '.', '.', '*', '.', '.', '.', '.']
['.', '.', '.', '.', '*', '.', '.', '.', '*', '.', '.', '*', '.', '.', '.', '*', '.', '.', '.', '.']
['.', '.', '.', '*', '.', '.', '.', '.', '.', '*', '*', '.', '.', '.', '.', '.', '*', '.', '.', '.']
['.', '.', '.', '*', '.', '.', '.', '.', '.', '*', '*', '.', '.', '.', '.', '.', '*', '.', '.', '.']
['.', '.', '.', '*', '.', '.', '.', '.', '.', '*', '.', '.', '.', '.', '.', '.', '*', '.', '.', '.']
['.', '.', '.', '*', '.', '.', '.', '.', '.', '*', '.', '.', '.', '.', '.', '.', '*', '.', '.', '.']
['.', '.', '.', '.', '*', '.', '.', '.', '.', '.', '*', '.', '.', '.', '.', '*', '.', '.', '.', '.']
['.', '.', '.', '.', '*', '.', '.', '.', '.', '.', '*', '.', '.', '.', '.', '*', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '*', '*', '/', '.', '.', '*', '.', '.', '*', '*', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '*', '*', '/', '.', '.', '*', '.', '.', '*', '*', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '.', '.', '*', '.', '*', '.', '.', '*', '.', '.', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '.', '.', '*', '.', '*', '.', '.', '*', '.', '.', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '.', '.', '.', '*', '*', '.', '*', '.', '.', '.', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '.', '.', '.', '*', '*', '.', '*', '.', '.', '.', '.', '.', '.', '.', '.']
['.', '.', '.', '.', '.', '.', '.', '.', '.', '*', '*', '.', '.', '.', '.', '.', '.', '.', '.', '/']
['.', '.', '.', '.', '.', '.', '.', '.', '.', '*', '*', '.', '.', '.', '.', '.', '.', '.', '.', '/']


Fixed submission (verdict: Accepted):
H, W = map(int,input().split())
S = [input() for i in range(H)]

for i in range(H):
  print(S[i])
  print(S[i])
Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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])

Failing test case input:
9 1
../..***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**/..*..**.....
.......*.*..*.-.....
........**.*........
.........**......../

Expected output:
../..***....***.....
../..***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**/..*..**.....
.....**/..*..**.....
.......*.*..*.-.....
.......*.*..*.-.....
........**.*........
........**.*........
.........**......../
.........**......../


Actual output:
['../..***....***.....']
['../..***....***.....']
['....*...*..*...*....']
['....*...*..*...*....']
['...*.....**.....*...']
['...*.....**.....*...']
['...*.....*.-....*../']
['...*.....*.-....*../']
['....*.....*....*....']
['....*.....*....*....']
['.....**/..*..**.....']
['.....**/..*..**.....']
['.......*.*..*.-.....']
['.......*.*..*.-.....']
['........**.*........']
['........**.*........']
['.........**......../']
['.........**......../']


Fixed submission (verdict: Accepted):
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])

Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w=map(int,input().split())
lst=[list(input()) for _ in range(h)]
lst_1=[]
for i in lst:
    print(*i)
    print(*i)

Failing test case input:
9 20
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*...**.....
.......*.*..*.......
........**.*........
.........**.........

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*......*...
...*.....*......*...
....*.....*....*....
....*.....*....*....
.....**..*...**.....
.....**..*...**.....
.......*.*..*.......
.......*.*..*.......
........**.*........
........**.*........
.........**.........
.........**.........


Actual output:
. . . . . * * * . . . . * * * . . . . .
. . . . . * * * . . . . * * * . . . . .
. . . . * . . . * . . * . . . * . . . .
. . . . * . . . * . . * . . . * . . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * * . . . . . * . . .
. . . * . . . . . * . . . . . . * . . .
. . . * . . . . . * . . . . . . * . . .
. . . . * . . . . . * . . . . * . . . .
. . . . * . . . . . * . . . . * . . . .
. . . . . * * . . * . . . * * . . . . .
. . . . . * * . . * . . . * * . . . . .
. . . . . . . * . * . . * . . . . . . .
. . . . . . . * . * . . * . . . . . . .
. . . . . . . . * * . * . . . . . . . .
. . . . . . . . * * . * . . . . . . . .
. . . . . . . . . * * . . . . . . . . .
. . . . . . . . . * * . . . . . . . . .


Fixed submission (verdict: Accepted):
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="")
Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
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')

Failing test case input:
5 1
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*...
....*.....*....*....
.....**..*../**.....
.......*..*.*.......
........**.*........
/........**......../

Expected output:
.....***....***.....
.....***....***.....
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*...
...*.....*.-....*...
....*.....*....*....
....*.....*....*....


Actual output:
['.....***....***.....', '....*...*..*...*....', '...*.....**.....*...', '...*.....*.-....*...', '....*.....*....*....']
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*...
....*.....*....*....
.....***....***.....
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*...
....*.....*....*....


Fixed submission (verdict: Accepted):
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')

Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w = map(int,input().split())
c = [list(map(str,input().split())) for _ in range(h)]

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

Failing test case input:
9 1
../..*.*....***...*-
....*...*..*...*....
...*.....**.....)...
...*.....*.-....*../
....*....*.....*....
.....**0..*..**.....
.....-.*..*.*.......
........*.**.......-
..../....**.....././

Expected output:
../..*.*....***...*-
../..*.*....***...*-
....*...*..*...*....
....*...*..*...*....
...*.....**.....)...
...*.....**.....)...
...*.....*.-....*../
...*.....*.-....*../
....*....*.....*....
....*....*.....*....
.....**0..*..**.....
.....**0..*..**.....
.....-.*..*.*.......
.....-.*..*.*.......
........*.**.......-
........*.**.......-
..../....**.....././
..../....**.....././


Actual output:
['../..*.*....***...*-']
['../..*.*....***...*-']
['....*...*..*...*....']
['....*...*..*...*....']
['...*.....**.....)...']
['...*.....**.....)...']
['...*.....*.-....*../']
['...*.....*.-....*../']
['....*....*.....*....']
['....*....*.....*....']
['.....**0..*..**.....']
['.....**0..*..**.....']
['.....-.*..*.*.......']
['.....-.*..*.*.......']
['........*.**.......-']
['........*.**.......-']
['..../....**.....././']
['..../....**.....././']


Fixed submission (verdict: Accepted):
h,w = map(int,input().split())
c = [list(map(str,input().split())) for _ in range(h)]

for i in range(h):
    print(''.join(c[i]))
    print(''.join(c[i]))
Problem: p03853
Buggy submission (Python (3.8.2), verdict: Wrong Answer):


h, w = map(int, input().split())
for i in range(h):
    a = str(input())
    for j in range(1):
        print(a)


Failing test case input:
2 13
.....***....***.....
....*...*-.*...*....
...*.....**.....*...
...*.....*......*...
....*.....*....*....
.....**..*../**.....
.......*.*..*.......
...../..**.*........
.........**......../

Expected output:
.....***....***.....
.....***....***.....
....*...*-.*...*....
....*...*-.*...*....


Actual output:
.....***....***.....
....*...*-.*...*....


Fixed submission (verdict: Accepted):


h, w = map(int, input().split())
row = []

for i in range(h):
    row.append(str(input()))

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

Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h,w=map(int,input().split())
x=[input() for _ in range(h)]
for i in x:
    print(i)
for i in x:
    print(i)

Failing test case input:
9 1
*./..*.*....***....-
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**0..*..**.....
.....-/*..*.*.......
........*.**.......-
..../....**.....././

Expected output:
*./..*.*....***....-
*./..*.*....***....-
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**0..*..**.....
.....**0..*..**.....
.....-/*..*.*.......
.....-/*..*.*.......
........*.**.......-
........*.**.......-
..../....**.....././
..../....**.....././


Actual output:
*./..*.*....***....-
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**0..*..**.....
.....-/*..*.*.......
........*.**.......-
..../....**.....././
*./..*.*....***....-
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**0..*..**.....
.....-/*..*.*.......
........*.**.......-
..../....**.....././


Fixed submission (verdict: Accepted):
h,w=map(int,input().split())
x=[input() for _ in range(h)]
for i in x:
    print(i)
    print(i)
Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, w = map(int, input().split())
c = [input().split() for _ in range(h)]
for i in range(2):
    for j in range(h):
        print(c[j][0])

Failing test case input:
9 1
*./..*.*....***....-
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**..*..0**.....
.....-.)..*.*.......
........*.**.......-
..../....**.....././

Expected output:
*./..*.*....***....-
*./..*.*....***....-
....*...*..*...*....
....*...*..*...*....
...*.....**.....*...
...*.....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**..*..0**.....
.....**..*..0**.....
.....-.)..*.*.......
.....-.)..*.*.......
........*.**.......-
........*.**.......-
..../....**.....././
..../....**.....././


Actual output:
*./..*.*....***....-
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**..*..0**.....
.....-.)..*.*.......
........*.**.......-
..../....**.....././
*./..*.*....***....-
....*...*..*...*....
...*.....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**..*..0**.....
.....-.)..*.*.......
........*.**.......-
..../....**.....././


Fixed submission (verdict: Accepted):
h, w = map(int, input().split())
c = [input().split() for _ in range(h)]
for j in range(h):
    print(c[j][0])
    print(c[j][0])

Problem: p03853
Buggy submission (Python (3.4.3), verdict: Wrong Answer):
h, w = map(int, input().split())
list_score  = [ list(input()) for _ in range(h) ]


for l in list_score:
    print(*l)

for l in list_score:
    print(*l)

Failing test case input:
9 1
*./..*.*....***....-
....*...*..*...*....
...).....**.....*...
...*.....*.-....*../
....*.....*....*....
.....**0..*..**.....
.....-.*..*.*.......
........*.**.......-
.........**..../././

Expected output:
*./..*.*....***....-
*./..*.*....***....-
....*...*..*...*....
....*...*..*...*....
...).....**.....*...
...).....**.....*...
...*.....*.-....*../
...*.....*.-....*../
....*.....*....*....
....*.....*....*....
.....**0..*..**.....
.....**0..*..**.....
.....-.*..*.*.......
.....-.*..*.*.......
........*.**.......-
........*.**.......-
.........**..../././
.........**..../././


Actual output:
* . / . . * . * . . . . * * * . . . . -
. . . . * . . . * . . * . . . * . . . .
. . . ) . . . . . * * . . . . . * . . .
. . . * . . . . . * . - . . . . * . . /
. . . . * . . . . . * . . . . * . . . .
. . . . . * * 0 . . * . . * * . . . . .
. . . . . - . * . . * . * . . . . . . .
. . . . . . . . * . * * . . . . . . . -
. . . . . . . . . * * . . . . / . / . /
* . / . . * . * . . . . * * * . . . . -
. . . . * . . . * . . * . . . * . . . .
. . . ) . . . . . * * . . . . . * . . .
. . . * . . . . . * . - . . . . * . . /
. . . . * . . . . . * . . . . * . . . .
. . . . . * * 0 . . * . . * * . . . . .
. . . . . - . * . . * . * . . . . . . .
. . . . . . . . * . * * . . . . . . . -
. . . . . . . . . * * . . . . / . / . /


Fixed submission (verdict: Accepted):
h, w = map(int, input().split())
list_score  = [ input() for _ in range(h) ]


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