Harryxun/testdata huggingface dataset:
Buggy python submission (verdict: Runtime Error):
X,N=map(int, input().split())
p=list(map(int,input().split()))   
if N==0:
    print(X)
else:
    for k in range(0,58):
        if not X-k in p:
            print(X-k)
            break 
        elif not X+k in p_list:
            print(X+k)
            break

Fixed submission:
X, N = map(int, input().split())
p_list = list(map(int, input().split()))

if N == 0: 
   print(X)
else:
   for i in range(0,100):
       if not X-i in p_list:
           print(X-i)
           break
       elif not X+i in p_list:
           print(X+i)
           break

Buggy python submission (verdict: Runtime Error):
X,N=map(int, input().split())
p=list(map(int,input().split()))   
if N==0:
    print(X)
else:
    for k in range(0,51):
        if not X-k in p:
            print(X-k)
            break 
        elif not X+k in p_list:
            print(X+k)
            break

Fixed submission:
X, N = map(int, input().split())
p_list = list(map(int, input().split()))

if N == 0: 
   print(X)
else:
   for i in range(0,100):
       if not X-i in p_list:
           print(X-i)
           break
       elif not X+i in p_list:
           print(X+i)
           break

Buggy python submission (verdict: Runtime Error):
X,N=map(int, input().split())
p=list(map(int,input().split()))
p.sort()    
if N==0:
    print(X)
else:
    for k in range(0,51):
        if not X-k in p:
            print(X-k)
            break 
        elif not X+k in p_list:
            print(X+k)
            break

Fixed submission:
X, N = map(int, input().split())
p_list = list(map(int, input().split()))

if N == 0: 
   print(X)
else:
   for i in range(0,100):
       if not X-i in p_list:
           print(X-i)
           break
       elif not X+i in p_list:
           print(X+i)
           break

Buggy python submission (verdict: Runtime Error):
X,N=map(int, input().split())
p=list(map(int,input().split()))
p.sort()    
for k in range(0,51):
    if not X-k in p:
        print(X-k)
        break 
    elif not X+k in p_list:
        print(X+k)
        break

Fixed submission:
X, N = map(int, input().split())
p_list = list(map(int, input().split()))

if N == 0: 
   print(X)
else:
   for i in range(0,100):
       if not X-i in p_list:
           print(X-i)
           break
       elif not X+i in p_list:
           print(X+i)
           break

Buggy python submission (verdict: Runtime Error):
X,N=map(int, input().split())
p=list(map(int,input().split()))
p.sort()    
for k in range(0,51):
    if not X-k in p:
        print(X-k)
        break 
    elif not X+i in p_list:
        print(X+i)
        break
        

Fixed submission:
X, N = map(int, input().split())
p_list = list(map(int, input().split()))

if N == 0: 
   print(X)
else:
   for i in range(0,100):
       if not X-i in p_list:
           print(X-i)
           break
       elif not X+i in p_list:
           print(X+i)
           break
Buggy python submission (verdict: Runtime Error):
N=input()
if N[-1]==3:
    print ("bon")
elif N[-1]==0 or N[-1]==8 or N[-1]==6 or [n-1]==1:
    print("pon")
else:
    print("hon")    


Fixed submission:
N=input()
if N[-1]=="3":
    print ("bon")
elif N[-1]=="0" or N[-1]=="8" or N[-1]=="6" or N[-1]=="1":
    print("pon")
else:
    print("hon")

Buggy python submission (verdict: Runtime Error):
N=input()
if s[-1]==3:
    print ("bon")
elif s[-1]==0 or s[-1]==8 or s[-1]==6 or s[-1]==1:
    print("pon")
else:
    print("hon")   

Fixed submission:
N=input()
if N[-1]=="3":
    print ("bon")
elif N[-1]=="0" or N[-1]=="8" or N[-1]=="6" or N[-1]=="1":
    print("pon")
else:
    print("hon")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[int(x) for x in input().split()]

b=0
for i in range(n-1):
  for j in range(i+1,n):
    b=(b+a[i]*a[j])%(10**9+7)
print(b)

Fixed submission:
n=int(input())
a=[int(x) for x in input().split()]

b=[0]*n
b[0]=a[0]
for i in range(n-1):
  b[i+1]=b[i]+a[i+1]

c=0
for j in range(n-1):
  c+=a[j]*(b[n-1]-b[j])
  
print(c%(10**9+7))
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a="abcdefghijklmnopqrstuvwxyz"
b=""
i=1
while n/26>0:
  if n%26==0:
    b="z"+b
  else:
    b=a[n%26-1]+b
    n=n//26
print(b)

Fixed submission:
n=int(input())
a="zabcdefghijklmnopqrstuvwxy"
b=""
while n/26>0:
  b=a[n%26]+b
  n=(n-1)//26
print(b)
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
a=[int(x) for x in input().split()]
b=1
for i in range(n):
  b*=a[i]
if b>10**18:
  print(-1)
else:
  print(b)

Fixed submission:
n=int(input())
a=[int(x) for x in input().split()]
if 0 in a:
  print(0)
else:
  b=1
  for i in range(n):
    b*=a[i]
    if b>10**18:
      print(-1)
      exit()
  print(b)
Buggy python submission (verdict: Time Limit Exceeded):
import sys

n=int(input())
a=input().split()
for i in range(n-1):
  for j in range(i+1,n):
    if a[i]==a[j]:
      print("NO")
      sys.exit()
print("YES")

Fixed submission:
import sys

n=int(input())
a=sorted([int(x) for x in input().split()])
for i in range(n-1):
  if a[i]==a[i+1]:
    print("NO")
    sys.exit()
print("YES")
Buggy python submission (verdict: Time Limit Exceeded):
n=int(input())
p=[int(x) for x in input().split()]
a=1
for i in range(1,n):
  if p[i]<=min(p[:i]):
    a+=1
print(a)    

Fixed submission:
n=int(input())
p=[int(x) for x in input().split()]
a=1
b=p[0]
for i in range(1,n):
  if p[i-1]<b:
    b=p[i-1]
  if p[i]<=b:
    a+=1
print(a)
Buggy python submission (verdict: Runtime Error):
input = input()
print(input * input)

Fixed submission:

x = int(input())
print(x * x)
Buggy python submission (verdict: Runtime Error):
n = input()

if n == 1:
  print ("Hello World")
else:
  a = input()
  b = input()
  a = int(a)
  b = int(b)
  c = a + b
  print (c)

Fixed submission:
n = input()
n = int(n)

if n == 1:
  print ("Hello World")
else:
  a = input()
  b = input()
  a = int(a)
  b = int(b)
  c = a + b
  print (c)
Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
number = 7
cnt = 1
answer = -1

for i in range(k):
    if number % k == 0:
        answer = cnt
        break
    else:
        cnt += 1
        number = number + 7 * 10 ** (cnt - 1)
print(answer)


Fixed submission:
k = int(input())
mod = 7 % k
cnt = 1
answer = -1

for i in range(k):
    if mod == 0:
        answer = cnt
        break
    else:
        cnt += 1
        mod = (mod * 10 + 7) % k
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
number = 7
cnt = 1
if k % 2 == 0:
    print(-1)
    exit()
for i in range(k):
    if number % k == 0:
        print(cnt)
        exit()
    else:
        cnt += 1
        number = number + 7 * 10 ** (cnt - 1)
print(-1)

Fixed submission:
k = int(input())
mod = 7 % k
cnt = 1
answer = -1

for i in range(k):
    if mod == 0:
        answer = cnt
        break
    else:
        cnt += 1
        mod = (mod * 10 + 7) % k
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
k = int(input())
number = 7
cnt = 1
if k % 2 == 0:
    print(-1)
    exit()
while 1:
    if number % k == 0:
        print(cnt)
        break
    else:
        cnt += 1
        number = number + 7 * 10 ** (cnt - 1)


Fixed submission:
k = int(input())
mod = 7 % k
cnt = 1
answer = -1

for i in range(k):
    if mod == 0:
        answer = cnt
        break
    else:
        cnt += 1
        mod = (mod * 10 + 7) % k
print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
##C
k = int(input())
number = str(7)
cnt = 1
if k % 2 == 0:
    print(-1)
    exit()
while 1:
    if int(number) % k == 0:
        print(cnt)
        break
    else:
        cnt += 1
        number += str(7)

Fixed submission:
k = int(input())
mod = 7 % k
cnt = 1
answer = -1

for i in range(k):
    if mod == 0:
        answer = cnt
        break
    else:
        cnt += 1
        mod = (mod * 10 + 7) % k
print(answer)
Buggy python submission (verdict: Runtime Error):
n = int(input())
c = input()
lists = list(c)
cnt = 0
while 1:
    if lists[cnt] == "W":
        cnt += 1
    else:
        break
number = 0
for i in range(len(lists) - cnt):
    if lists[i + cnt] == "W":
        number += 1
print(number)


Fixed submission:
n = int(input())
c = input()
lists = list(c)
cnt = 0

for i in range(len(lists)):
    if lists[i] == "R":
        cnt += 1
change = 0
for i in range(cnt):
    if lists[i] == "W":
        change += 1
print(change)

Buggy python submission (verdict: Runtime Error):
n = int(input())
c = input()
lists = list(c)
cnt = 0
while 1:
    if lists[cnt] == "W":
        cnt += 1
    else:
        break
number = 0
for i in range(len(lists) - cnt):
    if lists[i + cnt] == "W":
        number += 1
print(number)


Fixed submission:
n = int(input())
c = input()
lists = list(c)
cnt = 0

for i in range(len(lists)):
    if lists[i] == "R":
        cnt += 1
change = 0
for i in range(cnt):
    if lists[i] == "W":
        change += 1
print(change)
Buggy python submission (verdict: Time Limit Exceeded):
n, k = map(int,input().split())
a = [int(i) for i in input().split()]
a.reverse()

lists = []
answer = a[0]
for i in range(1, k):
    answer = answer * a[i]
lists.append(answer)

for i in range(n - k):
    answer = answer / a[i] * a[i + k]
    lists.append(answer)

lists.reverse()

for i in range(n - k):
    if lists[i] < lists[i + 1]:
        print("Yes")
    else:
        print("No")


Fixed submission:
n, k = map(int,input().split())
a = [int(i) for i in input().split()]
a.reverse()
lists = []

for i in range(n - k):
    if a[i] <= a[i + k]:
        lists.append(0)
    else:
        lists.append(1)
lists.reverse()

for i in range(n - k):
    if lists[i] == 1:
        print("Yes")
    else:
        print("No")
Buggy python submission (verdict: Runtime Error):
n = int(input())
s = [input() for i in range(n)]

AC = s.count("AC")
WA = s.count("WA")
TLE = s.count("TLE")
RE = s.count("RE")

AC2 = "AC x " + str(AC)
WA2 = "WA x " + str(WA)
TLE2 = "TLE x " + str(TLE)
RE2 = "RE x " + str(RE)
x
list = [AC2,WA2,TLE2,RE2]
list_n = "\n".join(list)
print(list_n)

Fixed submission:
n = int(input())
s = [input() for i in range(n)]

AC = s.count("AC")
WA = s.count("WA")
TLE = s.count("TLE")
RE = s.count("RE")

AC2 = "AC x " + str(AC)
WA2 = "WA x " + str(WA)
TLE2 = "TLE x " + str(TLE)
RE2 = "RE x " + str(RE)

list = [AC2,WA2,TLE2,RE2]
list_n = "\n".join(list)
print(list_n)
Buggy python submission (verdict: Runtime Error):
from itertools import accumulate
from bisect import bisect_right

n, m, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

##累積和のリストが得られる
a_cum = list(accumulate(a))
b_cum = list(accumulate(b))

ans = [0]
for i in range(n+1):    
    c = bisect_right(b, k-a[i]) - 1 
    if c != -1: 
        ans.append(c+i)
print(max(ans))

Fixed submission:
from itertools import accumulate
from bisect import bisect_right

n, m, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

##累積和のリストが得られる
a_cum = [0] + list(accumulate(a))
b_cum = [0] + list(accumulate(b))

ans = [0]
for i in range(n + 1):    #0~n+1
    c = bisect_right(b_cum, k-a_cum[i]) - 1 ##Aをi冊読んだ場合の残り時間 : k-a[i]  bisect_rightでbの累積時間の最大のインデックス(本の冊数)が求まる
                                 ##bisectは位置が求まるので、-1で冊数を求めている
    if c != -1: #0から始まるので、冊数が0の場合は-1となってしまう
        ans.append(c+i)

print(max(ans))

Buggy python submission (verdict: Runtime Error):
from itertools import accumulate
from bisect import bisect_right

n, m, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

##累積和のリストが得られる
a_cum = list(accumulate(a))
b_cum = list(accumulate(b))

ans=[0]
for i in range(n+1):    #0~n+1
    c = bisect_right(b,k-a[i])-1 ##Aをi冊読んだ場合の残り時間 : k-a[i]  bisect_rightでbの累積時間の最大のインデックス(本の冊数)が求まる
                                 ##bisectは位置が求まるので、-1で冊数を求めている
    if c!=-1: #0から始まるので、冊数が0の場合は-1となってしまう
        ans.append(c+i)
print(max(ans))

Fixed submission:
from itertools import accumulate
from bisect import bisect_right

n, m, k = map(int, input().split())
a = [int(i) for i in input().split()]
b = [int(i) for i in input().split()]

##累積和のリストが得られる
a_cum = [0] + list(accumulate(a))
b_cum = [0] + list(accumulate(b))

ans = [0]
for i in range(n + 1):    #0~n+1
    c = bisect_right(b_cum, k-a_cum[i]) - 1 ##Aをi冊読んだ場合の残り時間 : k-a[i]  bisect_rightでbの累積時間の最大のインデックス(本の冊数)が求まる
                                 ##bisectは位置が求まるので、-1で冊数を求めている
    if c != -1: #0から始まるので、冊数が0の場合は-1となってしまう
        ans.append(c+i)

print(max(ans))
Buggy python submission (verdict: Runtime Error):
a, b, c, d, e = map(int, input().split())
if a = 0:
	print("1")
elif b = 0:
	print("2")
elif c = 0:
	print("3")
elif d = 0:
	print("4")
else:
	print("5")
    
    

Fixed submission:
x = [int(i) for i in input().split()]
print(x.index(0) + 1)

Buggy python submission (verdict: Runtime Error):
a, b, c, d, e = map(int,input().split())
if a = 0:
　　　　print(‘1’)
elif b = 0:
　　　　print(‘2’)
elif c = 0:
　　　　print(‘3’)
elif d = 0:
　　　　print(‘4’)
else: 
　　　　print('5')
    

Fixed submission:
x = [int(i) for i in input().split()]
print(x.index(0) + 1)
Buggy python submission (verdict: Time Limit Exceeded):
n = int(input())
a = [int(i) for i in input().split()]
answer = 1
for i in range(len(a)):
    answer = answer * a[i]

if answer > 10 ** 18:
    print(-1)
else:
    print(answer)


Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
answer = 1
for i in range(len(a)):
    answer = answer * a[i]
    if answer > 10 ** 18:
        if 0 in a:
            print(0)
        else:
            print(-1)
        break
else:
    print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
import functools
import operator

n = int(input())
a = [int(i) for i in input().split()]

result = functools.reduce(operator.mul, a)

if result > 10 ** 18:
    print(-1)
else:
    print(result)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
answer = 1
for i in range(len(a)):
    answer = answer * a[i]
    if answer > 10 ** 18:
        if 0 in a:
            print(0)
        else:
            print(-1)
        break
else:
    print(answer)

Buggy python submission (verdict: Time Limit Exceeded):
##B
n = int(input())
a = [int(i) for i in input().split()]

for i in range(len(a)):
    if i == 0:
        answer = a[0]
    else:
        answer = answer * a[i]

if answer > 10 ** 18:
    print(-1)
else:
    print(answer)

Fixed submission:
n = int(input())
a = [int(i) for i in input().split()]
answer = 1
for i in range(len(a)):
    answer = answer * a[i]
    if answer > 10 ** 18:
        if 0 in a:
            print(0)
        else:
            print(-1)
        break
else:
    print(answer)
Buggy python submission (verdict: Runtime Error):
s, t = input().split()
print("Yes" if s == t[:-1] else "No")


Fixed submission:
s = input()
t = input()
print("Yes" if s == t[:-1] else "No")

Buggy python submission (verdict: Runtime Error):
s, t = input().split()
print("Yes" if s == t[:-1] else "No")


Fixed submission:
s = input()
t = input()
print("Yes" if s == t[:-1] else "No")
Buggy python submission (verdict: Time Limit Exceeded):
from itertools import product
from math import gcd

k = int(input())
nums = range(1,k+1)
##numsから重複を許して、3つを取り並べる(重複順列)
list = list(product(nums,repeat=3))

answer = []
##gcd(a,b,c) a,bの最大公約数を計算した後、その最大公約数とcの最大公約数を計算
for i in range(len(list)):
    answer.append(gcd(gcd(list[i][0],list[i][1]),list[i][2]))
print(sum(answer))

Fixed submission:
from math import gcd
k = int(input())
ans = 0
for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            ans += gcd(gcd(a,b),c)
print(ans)

Buggy python submission (verdict: Time Limit Exceeded):
import itertools
import math
k = int(input())
nums = list(range(1,k+1))
list = list(itertools.product(nums,repeat=3))
gcd = []
for i in range(len(list)):
    gcd.append(math.gcd(math.gcd(list[i][0],list[i][1]),list[i][2]))
print(sum(gcd))

Fixed submission:
from math import gcd
k = int(input())
ans = 0
for a in range(1, k + 1):
    for b in range(1, k + 1):
        for c in range(1, k + 1):
            ans += gcd(gcd(a,b),c)
print(ans)
Buggy python submission (verdict: Time Limit Exceeded):
##72_C
n = int(input())
a = [int(i) for i in input().split()]


cnt_list = []
minn = min(a)
maxx= max(a)

for x in range(minn - 1, maxx + 2):
    cnt = 0
    for i in range(n):
        if a[i] == x or a[i] + 1 == x or a[i] - 1 == x:
            cnt += 1
    cnt_list.append(cnt)

print(max(cnt_list))

Fixed submission:
from collections import Counter
n = int(input())
a = [int(i) for i in input().split()]
b = []
for i in a:
    b.append(i + 1)
    b.append(i)
    b.append(i - 1)
##辞書型 キーに要素、値に出現回数を出力
c = Counter(b)
##most_comonn (要素, 出現回数)という形のタプルを出現回数順に並べたリストを返す
##出現回数が最も多いものは[0],出現回数のみを出力するので[1]
print(c.most_common()[0][1])
Buggy python submission (verdict: Runtime Error):
s = input().split()
S = s[0]
T = s[1]

score = []
for i in range(len(S)-len(T)):
    U = s[i: i+len(T)]
    cnt = 0
    for j in range(T):
        if U[j] != T[j]:
            cnt = cnt + 1
        score.append(cnt)
print(min(score))



Fixed submission:
S = input()
T = input()

score = []
for i in range(len(S)-len(T)+1):
    U = S[i: i+len(T)]
    cnt = 0
    for j in range(len(T)):
        if U[j] != T[j]:
            cnt = cnt + 1
    score.append(cnt)
print(min(score))
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split())) 

goukei = 0
for i in range(N):
    a = A[0]
    del A[0]
    Agoukei = sum(A)
    goukei = goukei + a*Agoukei

k = 10**9 + 7
print(goukei%k)

Fixed submission:
N = int(input())
A = list(map(int, input().split())) 
 
goukei = 0

sumA = sum(A)
for i in range(N):
    a = A[i]
    sumA = sumA - a
    goukei = goukei + sumA*a

k = 10**9 + 7
print(goukei%k)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split())) 

goukei = 0
B = A
for i in range(N):
    a = A[0]
    del B[0]
    Bgoukei = sum(B)
    goukei = goukei + a*Bgoukei


k = 10**9 + 7
print(goukei%k)

Fixed submission:
N = int(input())
A = list(map(int, input().split())) 
 
goukei = 0

sumA = sum(A)
for i in range(N):
    a = A[i]
    sumA = sumA - a
    goukei = goukei + sumA*a

k = 10**9 + 7
print(goukei%k)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split())) 

goukei = 0
for i in range(N):
    for j in range(i+1,N):
      goukei = goukei + A[i] * A[j]
k = 10**9 + 7
print(goukei%k)

Fixed submission:
N = int(input())
A = list(map(int, input().split())) 
 
goukei = 0

sumA = sum(A)
for i in range(N):
    a = A[i]
    sumA = sumA - a
    goukei = goukei + sumA*a

k = 10**9 + 7
print(goukei%k)

Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split())) 

goukei = 0
for i in range(N):
    for j in range(N):
        if i<j:
            goukei = goukei + A[i] * A[j]
k = 10**9 + 7
print(goukei%k)


Fixed submission:
N = int(input())
A = list(map(int, input().split())) 
 
goukei = 0

sumA = sum(A)
for i in range(N):
    a = A[i]
    sumA = sumA - a
    goukei = goukei + sumA*a

k = 10**9 + 7
print(goukei%k)
Buggy python submission (verdict: Time Limit Exceeded):
N = int(input())
A = list(map(int, input().split())) 
klists = []
B = [A[0]]
for i in range(N-1):
    if max(B) > A[i+1]:
        k = max(B)-A[i+1]
        klists.append(k)
        A[i+1] = A[i+1] + k
    B.append(A[i+1])
        
print(sum(klists))



Fixed submission:
N = int(input())
A = list(map(int, input().split())) 
klists = []
B = [A[0]]
for i in range(N-1):
    if B[i] > A[i+1]:
        k = B[i]-A[i+1]
        klists.append(k)
        A[i+1] = A[i+1] + k
    B.append(A[i+1])
        
print(sum(klists))
Buggy python submission (verdict: Runtime Error):
N = int(input())
s = list(map(int, input().split()))

count = 0

for i in range(N+1):
  if ((i+1)%2 == 1) and (s[i]%2 == 1):
    count = count + 1

print(count)

Fixed submission:
N = int(input())
s = list(map(int, input().split()))

count = 0

for i in range(1,N+1):
  if (i%2 == 1) and (s[i-1]%2 == 1):
    count = count + 1
 

print(count)
Buggy python submission (verdict: Runtime Error):
k = int(input())
s = input()

if len(s)<=k:
	print(s)

else:
	print(s[0:k] + "...")

Fixed submission:
n = int(input()) 
en = str(n)
if (en[-1:]=="2" or en[-1:]=="4" or en[-1:]=="5" or en[-1:]=="7" or en[-1:]=="9"):
	print("hon")
elif (en[-1:]=="0" or en[-1:]=="1" or en[-1:]=="6" or en[-1:]=="8"):
	print("pon")
else:
	print("bon")

Buggy python submission (verdict: Runtime Error):
k = int(input())
s = input()

if len(s)<=k:
	print(s)

else:
	print(s[0:k] + "…")

Fixed submission:
n = int(input()) 
en = str(n)
if (en[-1:]=="2" or en[-1:]=="4" or en[-1:]=="5" or en[-1:]=="7" or en[-1:]=="9"):
	print("hon")
elif (en[-1:]=="0" or en[-1:]=="1" or en[-1:]=="6" or en[-1:]=="8"):
	print("pon")
else:
	print("bon")

Buggy python submission (verdict: Runtime Error):
k = int(input())
s = input()

if len(s)<=k:
	print(s)

else:
	print(s[0:k] + "...")

Fixed submission:
n = int(input()) 
en = str(n)
if (en[-1:]=="2" or en[-1:]=="4" or en[-1:]=="5" or en[-1:]=="7" or en[-1:]=="9"):
	print("hon")
elif (en[-1:]=="0" or en[-1:]=="1" or en[-1:]=="6" or en[-1:]=="8"):
	print("pon")
else:
	print("bon")
Buggy python submission (verdict: Runtime Error):
from collections import Counter
N = int(input())
s = [input() for i in range(N)]
c = collections.Counter(s)
print(len(c))

Fixed submission:
from collections import Counter
N = int(input())
s = [input() for i in range(N)]
c = Counter(s)
print(len(c))

Buggy python submission (verdict: Runtime Error):
N = int(input())
s = [input() for i in range(N)] #複数行の数値の入力を取得
c = collections.Counter(s)
print(len(c))

Fixed submission:
from collections import Counter
N = int(input())
s = [input() for i in range(N)]
c = Counter(s)
print(len(c))

Buggy python submission (verdict: Runtime Error):
N = int(input())
s = [input() for i in range(N)] #複数行の数値の入力を取得
c = collections.Counter(s)
print(c)

Fixed submission:
from collections import Counter
N = int(input())
s = [input() for i in range(N)]
c = Counter(s)
print(len(c))
Buggy python submission (verdict: Runtime Error):
N = int(input())
A = int(input())
B = int(input())

def kansuu(N,A,B):
	if N*A>B:
	  return B
	else:
 	  return NA

Fixed submission:
import numpy as np
N,A,B=map(int,input().split())
if N*A > B:
  print(B)
else:
  print(N*A)

Buggy python submission (verdict: Runtime Error):
N = input()
A = input()
B = input()
if NA > B:
  return B
else:
  return NA

Fixed submission:
import numpy as np
N,A,B=map(int,input().split())
if N*A > B:
  print(B)
else:
  print(N*A)