qyliang/CodeNanoFix huggingface dataset:
Buggy code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
from operator import mul


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n = int(S()[-1])
print(n)
if n in (2, 4, 5, 7, 9):
    print('hon')
elif n in (0, 1, 6, 8):
    print('pon')
else:
    print('bon')

Fixed code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations, product
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from operator import mul
from functools import reduce
from operator import mul


sys.setrecursionlimit(2147483647)
INF = 10 ** 13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]


n = int(S()[-1])
if n in (2, 4, 5, 7, 9):
    print('hon')
elif n in (0, 1, 6, 8):
    print('pon')
else:
    print('bon')
Buggy code:
def Ii():return int(input())
def Mi():return map(int,input().split())
def Li():return list(map(int,input().split()))

n = Ii()%10
if n == 3
  print('bon')
elif n==2 or n == 4 or n == 5 or n==7 or n == 9
  print('hon')
else
  print('pon')

 

Fixed code:
def Ii():return int(input())
def Mi():return map(int,input().split())
def Li():return list(map(int,input().split()))
 
n = Ii()%10
if n == 3:
  print('bon')
elif n==2 or n == 4 or n == 5 or n==7 or n == 9:
  print('hon')
else:
  print('pon')
Buggy code:
n=int(input())
n%=10
if n==1:
    print('bon')
elif n==0 or n==1 or n==6 or n==8:
    print('pon')
else:
    print('hon')

Fixed code:
n=int(input())
n%=10
if n==3:
    print('bon')
elif n==0 or n==1 or n==6 or n==8:
    print('pon')
else:
    print('hon')
Buggy code:
N=int(input())
n=N%10
if n==2 or n==4 or n==5 or n==7 or n==9:
    ptint('hon')
elif n==3
    print('bon')
else:
    print('pon')


Fixed code:
N = int(input())
N = N % 10
if N == 3:
    print("bon")
elif N == 2 or N == 4 or N==5 or N ==7 or N ==9:
    print("hon")
else:
    print("pon")
Buggy code:
N=int(input())
n=N%10
if n=2,4,5,7,9:
    print('hon')
elif n=0,1,6,8:
    print('pon')
else:
    print('bon')

Fixed code:
N=int(input())

N%=10
if N in (2,4,5,7,9):
    print("hon")
elif N in (0,1,6,8):
    print("pon")
else:
    print("bon")
Buggy code:
#A
n = int(input())
hon = [2, 4, 5, 7, 9]
pon = [0, 1, 6, 8]
if n in hon:
    print('hon')
elif n in pon:
    print('pon')
else:
    print('bon')

Fixed code:
#A
n = input()
hon = ['2', '4', '5', '7', '9']
pon = ['0', '1', '6', '8']
if n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
else:
    print('bon')
Buggy code:
n = input()
word = n[-1]

if word == "3":
  print(n + "bon")
elif word == "0" or word == "1" or word == "6" or word == "8":
  print(n + "pon")
else:
  print(n + "hon")

Fixed code:
n = input()
word = n[-1]
 
if word == "3":
  print("bon")
elif word == "0" or word == "1" or word == "6" or word == "8":
  print("pon")
else:
  print("hon")
Buggy code:
n = int(input())
a = n-(n//100)*100
b = a-(a//10)*10
print(b)
if b == 2 or b == 4 or b == 5 or b == 7 or b == 9:
  print("hon")
if b == 0 or b == 1:
  print("pon")
if b == 3:
  print("bon")



Fixed code:
n = int(input())
a = n-(n//100)*100
b = a-(a//10)*10
if b == 2 or b == 4 or b == 5 or b == 7 or b == 9:
  print("hon")
if b == 0 or b == 1 or b == 6 or b == 8:
  print("pon")
if b == 3:
  print("bon")
Buggy code:
a = input()
b = a - a // 10 * 10
c = ("pon" if b == 0 else
     "pon" if b == 1 else
     "hon" if b == 2 else
     "bon" if b == 3 else
     "hon" if b == 4 else
     "hon" if b == 5 else
     "pon" if b == 6 else
     "hon" if b == 7 else
     "pon" if b == 8 else
     "hon" if b == 9 else
     ""
     )
print(c)

Fixed code:
a = int(input())
b = a - a // 10 * 10
c = ("pon" if b == 0 else
     "pon" if b == 1 else
     "hon" if b == 2 else
     "bon" if b == 3 else
     "hon" if b == 4 else
     "hon" if b == 5 else
     "pon" if b == 6 else
     "hon" if b == 7 else
     "pon" if b == 8 else
     "hon" if b == 9 else
     ""
     )
print(c)
Buggy code:
n = list(input())
print(n,n[-1])
if(n[-1] == "3"):
    print("bon")
elif(n[-1] in ["0","1","6","8"]):
    print("pon")
else:
    print("hon")


Fixed code:
n = list(input())
if(n[-1] == "3"):
    print("bon")
elif(n[-1] in ["0","1","6","8"]):
    print("pon")
else:
    print("hon")
Buggy code:
n=int(input())

a=int(str(n)[-1])
print(a)
if a==3:
  print("bon")
elif a in [0,1,6,8]:
  print("pon")
else:
  print("hon")

Fixed code:
n=int(input())

a=int(str(n)[-1])
#print(a)
if a==3:
  print("bon")
elif a in [0,1,6,8]:
  print("pon")
else:
  print("hon")
Buggy code:
N=int(input())
if N%10 in [2,4,5,7,9]:
  print(str(N) + "hon")
elif N%10 in [0,1,6,8]:
  print(str(N) + "pon")
else:
  print(str(N) + "bon")

Fixed code:
N=int(input())
if N%10 in [2,4,5,7,9]:
  print("hon")
elif N%10 in [0,1,6,8]:
  print("pon")
else:
  print("bon")
Buggy code:
data=[["hon",2,4,5,9,7],["pon",0,1,6,8],["bon",3]]
N=int(input())%10
for i in range(3):
    if N in data:
        print(data[i][0])

Fixed code:
data=[["hon",2,4,5,9,7],["pon",0,1,6,8],["bon",3]]
N=int(input())%10
for i in range(3):
    if N in data[i]:
        print(data[i][0])
Buggy code:
# -*- coding: utf-8 -*-
"""
Created on Mon May 18 14:53:59 2020

@author: 17664
"""

yomi = {2:'hon', 4:'hon', 5:'hon', 7:'hon', 9:'hon', 0:'pon', 1:'pon',
        6:'pon', 8:'pon', 3:'bon'}

print(yomi[input()[-1]])

Fixed code:
# -*- coding: utf-8 -*-
"""
Created on Mon May 18 14:53:59 2020

@author: 17664
"""

yomi = {2:'hon', 4:'hon', 5:'hon', 7:'hon', 9:'hon', 0:'pon', 1:'pon',
        6:'pon', 8:'pon', 3:'bon'}

print(yomi[int(input()[-1])])
Buggy code:
n = str(input())

a = int(n[-1])
if a == [0,1,6,8]:
  print('pon')
elif a == 3:
  print('bon')
else:
  print('hon')

Fixed code:
n = str(input())

a = int(n[-1])
if a==0 or a==1 or a==6 or a==8:
  print('pon')
elif a == 3:
  print('bon')
else:
  print('hon')
Buggy code:
n = int(input())

if n == 3:
	print('bon')
elif n in [0, 1, 6, 8]:
	print('pon')
else:
	print('hon')

Fixed code:
n = input()
if n[-1] == '3':
    print('bon')
elif n[-1] in ('0', '1', '6', '8',):
    print('pon')
else:
    print('hon')
Buggy code:
N = str(input())

F = N[-1]

if F == "3":
  print("bon")
elif F == "0" or "1" or "6" or "8":
  print("pon")
else:
  print("hon")

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

a = N%10

if a == 0 or 1 or 6 or 8:
  print("pon")
elif a == 3:
  print("bon")
else:
  print("bon")

Fixed code:
N = int(input())

a = N%10

if a == 0 or a==1 or a==6 or a==8:
  print("pon")
elif a == 3:
  print("bon")
else:
  print("hon")
Buggy code:
N = int(input())

a = N%10

if a == 2 or 4 or 5 or 7 or 9:
  print("hon")
elif a == 3:
  print("bon")
else:
  print("pon")

Fixed code:
M = int(input())
N = M%10
if N==2 or N==4 or N==5 or N==7 or N==9:
  print('hon')
elif N==3:
  print('bon')
else:
  print('pon')
Buggy code:
n = int(input())
n = n%10
if n == 3:
    print('bon')
elif n == 0 or 1 or 6 or 8:
    print('pon')
else:
    print('hon')

Fixed code:
n = int(input())
a = n%10
if a == 3:
    print("bon")
elif a==0 or a==1 or a==6 or a==8:
    print("pon")
else:
    print("hon")
Buggy code:
n = str(input())

a = [2,4,5,7,9]
b = [0,1,8]

print(n[-1:])
if n[-1:] in a:
  print("hon")
elif n[-1:] in b:
  print("pon")
else:
  print("bon")
  


Fixed code:
n = input()
a = ["2","4","5","7","9"]
b = ["0","1","6","8"]
if n[-1] in a:
	print ("hon")
elif n[-1] in b:
	print ("pon")
else:
	print ("bon")
Buggy code:
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().rstrip().split())
inl = lambda: list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))

n = ins()
if n[0] == "3":
    print("bon")
elif n in [0, 1, 6, 8]:
    print("Pon")
else:
    print("hon")

Fixed code:
import sys
input = sys.stdin.readline
ins = lambda: input().rstrip()
ini = lambda: int(input().rstrip())
inm = lambda: map(int, input().rstrip().split())
inl = lambda: list(map(int, input().split()))
out = lambda x, s='\n': print(s.join(map(str, x)))

n = ini()
if n%10 == 3:
    print("bon")
elif n%10 in [0, 1, 6, 8]:
    print("pon")
else:
    print("hon")
Buggy code:
a = input()

hon = [2,4,5,7,9]
pon = [0,1,6,8]
bon = [3]

if a[-1] in bon:
  print("bon")
elif a[-1] in hon:
  print("hon")
else:
  print("pon")

Fixed code:
a = input()

hon = ['2','4','5','7','9']
bon = ['3']
pon = ['0','1','6','8']

if a[-1] in hon:
  print("hon")
elif a[-1] in bon:
  print("bon")
else:
  print("pon")
Buggy code:
N = input()
print(N[-1])
n = N[-1]
if n in ["2","4","5","7","9"]:
    print("hon")
elif n in ["0","1","6","8"]:
    print("pon")
else:
    print("bon")

Fixed code:
n = str(input())

hon = ['2', '4', '5', '7', '9']
pon = ['0', '1', '6', '8']
bon = [3]

if n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
else:
    print('bon')
Buggy code:
n=input()
if n[-1]==3:
    print("bon")
elif n[-1]==0 or n[-1]==1 or n[-1]==6 or n[-1]==8:
    print("pon")
else:
    print("hon")

Fixed code:
n=input()[::-1]
if n[0]=="3":
    print("bon")

elif n[0]=="0" or n[0]=="1" or n[0]=="6" or n[0]=="8":
    print("pon")
else:
    print("hon")
Buggy code:
N = input()
N_list = list(N)
print(N_list)
if N_list[0] == "2" or N_list[0] == "4" or N_list[0] == "5" or N_list[0] == "7" or N_list[0] == "9":
    print("hon")
elif N_list[0] == "0" or N_list[0] == "1" or N_list[0] == "6" or N_list[0] == "8":
    print("pon")
else:
    print("bon")
    

Fixed code:
N = input()
N_list = list(N)
if N_list[-1] == "2" or N_list[-1] == "4" or N_list[-1] == "5" or N_list[-1] == "7" or N_list[-1] == "9":
    print("hon")
elif N_list[-1] == "0" or N_list[-1] == "1" or N_list[-1] == "6" or N_list[-1] == "8":
    print("pon")
else:
    print("bon")
Buggy code:
n = input()
# a = map(int,input().split())
a = int(n[-1])
print("a",a)
if a == 2 or a == 4 or a == 5 or a == 7 or a == 9:
    print("hon")
elif a == 3:
    print("bon")
else:
    print("pon")


Fixed code:
n = input()
# a = map(int,input().split())
a = int(n[-1])
# print("a",a)
if a == 2 or a == 4 or a == 5 or a == 7 or a == 9:
    print("hon")
elif a == 3:
    print("bon")
else:
    print("pon")
Buggy code:
N = int(input())
N = N%10
if N in [2,4,5,7,9]:
  return'hon'
elif N in[0,1,6,8]:
  return 'pon'
elif N == 3:
  return 'bon'

Fixed code:
N = int(input())
N = N%10
if N in [2,4,5,7,9]:
  print('hon')
elif N in[0,1,6,8]:
  print('pon')
elif N == 3:
  print('bon')
Buggy code:
l = str(int(input()))
n = []

for i in range(len(l)):
    n.append((l)[i])
print(n[-1])

if n[-1] == '2' or n[-1] == '4' or  n[-1] == '5' or n[-1] == '7' or  n[-1] == '9':
    print("hon")
elif  n[-1] == '3':
    print("bon")
else:
    print("pon")

Fixed code:
l = str(int(input()))
n = []

for i in range(len(l)):
    n.append((l)[i])
    
if n[-1] == '2' or n[-1] == '4' or  n[-1] == '5' or n[-1] == '7' or  n[-1] == '9':
    print("hon")
elif  n[-1] == '3':
    print("bon")
else:
    print("pon")
Buggy code:
num = input()

first_place = int(str(num)[-1])

if first_place == 3:
  print('bon')
elif first_place in [0, 1, 6, 8]:
  print('pon')
 else:
  print('hon')
 

Fixed code:
num = input()
 
first_place = int(str(num)[-1])
 
if first_place == 3:
  print('bon')
elif first_place in [0, 1, 6, 8]:
  print('pon')
else:
  print('hon')
Buggy code:
n = int(input())
n = n % 10
if n == 2 or n == 4 or n == 5 or n == 7 or n == 9:
    print("hon")
elif n == 0 or n == 1 or n == 6 or n == 8:
    print("pon")
else
    print("bon")


Fixed code:
n = int(input())
a = n % 10
if a == 2 or a == 4 or a == 5 or a == 7 or a == 9:
    print('hon')
elif a == 0 or a == 1 or a == 6 or a == 8:
    print('pon')
else:
    print('bon')
Buggy code:
N = int(input())

if N % 10 == 3:
	print('bon')
else if N%10 == 0 or N%10 == 1 or N%10 == 6 or N%10 == 8:
	print('pon')
else: print('hon')
  

Fixed code:
N = int(input())
 
if N % 10 == 3:
	print('bon')
elif N%10 == 0 or N%10 == 1 or N%10 == 6 or N%10 == 8:
	print('pon')
else: print('hon')
Buggy code:
n=int(input())
num=n%1000
if num==3:
  print("bon")
elif num==0 or num==1 or num==6 or num==8:
  print("pon")
else:
  print("hon")

Fixed code:
n=int(input())
num=n%10
if num==3:
  print("bon")
elif num==0 or num==1 or num==6 or num==8:
  print("pon")
else:
  print("hon")
Buggy code:
n = input()
x = n[-1]
if x in [2,4,5,7,9]:
    print("hon")
elif x in [0,1,6,8]:
    print("pon")
else:
    print("bon")


Fixed code:
n = input()
if n[-1] in {"2", "4", "5", "7", "9"}:
  print("hon")
elif n[-1] in {"0", "1", "6", "8"}:
  print("pon")
else:
  print("bon")
Buggy code:
# -*- coding: utf-8 -*-

n = str(input())

hon = ['2', '4', '5', '7', '9']
pon = ['0', '1', '6', '8']
bon = ['3']

print(n[-1])

if n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
else:
    print('bon')

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

n = str(input())

hon = ['2', '4', '5', '7', '9']
pon = ['0', '1', '6', '8']
bon = ['3']

if n[-1] in hon:
    print('hon')
elif n[-1] in pon:
    print('pon')
else:
    print('bon')
Buggy code:
import sys
sys.setrecursionlimit(10**6)


def main(input, print):
    n = list(input())
    if n[-1] in ['2','4','5','7','9']:
        print('hon')
    elif n[-1] in ['0','1','6','8']:
        print('pon')
    else:
        print('bon')


if __name__ == '__main__':
    main(sys.stdin.readline, print)


Fixed code:
import sys
sys.setrecursionlimit(10**6)


def main(input, print):
    n = list(input().strip())
    if n[-1] in ['2','4','5','7','9']:
        print('hon')
    elif n[-1] in ['0','1','6','8']:
        print('pon')
    else:
        print('bon')


if __name__ == '__main__':
    main(sys.stdin.readline, print)
Buggy code:
N = input()
N = int(N[2])
if N == 3:
    print('bon')
elif N in [0,1,6,8]:
    print('pon')
else:
    print('hon')


Fixed code:
N = input()
N = int(N[-1])
if N == 3:
    print('bon')
elif N in [0,1,6,8]:
    print('pon')
else:
    print('hon')
Buggy code:
n=str(input())

if n[-1]==3:
  print('bon')
elif n[-1]==0 or 1 or 6 or 8:
  print('pon')
else:
  print('hon')


Fixed code:
n=str(input())

if int(n[-1])==3:
  print('bon')
elif int(n[-1])==0 or int(n[-1])==1 or int(n[-1])==6 or int(n[-1])==8:
  print('pon')
else:
  print('hon')
Buggy code:
n = input()

if n[-1] in [2,4,5,7,9]:
  print('hon')
elif n[-1] in [0,1,6,8]:
  print('pon')
else:
  print('bon')

Fixed code:
N = input()
if N[-1] in ["2","4","5","7","9"]:
    print("hon")
elif N[-1] in ["0","1","6","8"]:
    print("pon")
else:
    print("bon")
Buggy code:
n = input()
if n[-1] == '3':
  print('bon')
if n[-1] in ['0','1','6','8']:
  print('pon')
else:
  print('hon')

Fixed code:
n = input()
if n[-1] == '3':
  print('bon')
elif n[-1] in ['0','1','6','8']:
  print('pon')
else:
  print('hon')
Buggy code:
input()
 N = N % 10
if N == 2 or N == 4 or N == 5 or N == 7 or N == 9:
     print('hon')
elif N == 3:
    print('bon')
else:
    print('pon')

Fixed code:
N = int(input())
N = N % 10
if N == 2 or N == 4 or N == 5 or N == 7 or N == 9:
     print('hon')
elif N == 3:
    print('bon')
else:
    print('pon')
Buggy code:
N=input()[-1]
if N==3:
  print("bon")
elif N==0 or 1 or 6 or 8:
  print("pon")
else:
  print("hon")

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

if N[-1] in [2,4,5,7,9]:
  print('hon')
elif N[-1] == 3:
  print('bon')
else:
  print('pon')

Fixed code:
N = list(input())
 
if N[-1] in ['2','4','5','7','9']:
  print('hon')
elif N[-1] == '3':
  print('bon')
else:
  print('pon')
Buggy code:
n = input()

m = (n[-1])

if m == '3':
    print('bon')
elif m == '0' or '1' or '6' or '8':
    print('pon')
else:
    print('hon')

Fixed code:
n = input()

m = (n[-1])

if m == '3':
    print('bon')
elif m == '0' or m == '1' or m =='6' or m =='8':
    print('pon')
else:
    print('hon')
Buggy code:
n=int(input())
a=n%10
if a==3:
  print('bon')
elif n==0:
  print('pon')
elif n==1:
  print('pon')
elif n==6:
  print('pon')
elif n==8:
  print('pon')
else:
  print('hon')

Fixed code:
n=int(input())
a=n%10
if a==3:
  print('bon')
elif a==0:
  print('pon')
elif a==1:
  print('pon')
elif a==6:
  print('pon')
elif a==8:
  print('pon')
else:
  print('hon')
Buggy code:
n = int(input().strip()) % 10
if n in ("2", "4", "5", "7", "9"):
    print("hon")
elif n in ("0", "1", "6", "8"):
    print("pon")
else:
  	print("bon")

Fixed code:
n = int(input().strip()) % 10
if n in (2, 4, 5, 7, 9):
    print("hon")
elif n in (0, 1, 6, 8):
    print("pon")
else:
  	print("bon")
Buggy code:
n = int(input())
a = n % 10
if (a == 3):
  print("bon")
elif (a == 2 or 4 or 5 or 7 or 9 ) :
  print("hon")
else:
  print("pon")


Fixed code:
n = int(input())
a = n % 10
if (a == 3):
  print("bon")
elif (a == 2 or a == 4 or a == 5 or a == 7 or a == 9) :
  print("hon")
else:
  print("pon")
Buggy code:
n = str(input())

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

Fixed code:
n = str(input())

if int(n[-1]) == 2 or int(n[-1]) == 4 or int(n[-1]) == 5 or int(n[-1]) == 7 or int(n[-1]) == 9:
    print("hon")
elif int(n[-1]) == 0 or int(n[-1]) == 1 or int(n[-1]) == 6 or int(n[-1]) == 8:
    print("pon")
else:
    print("bon")
Buggy code:
N = int(input())
N &= 10
if N in [2,4,5,7,9]:
	print('hon')
elif N in [0,1,6,8]:
	print('pon')
else N == 3
	print('bon')

Fixed code:
N = int(input())

if (N % 10) in [2, 4, 5, 7, 9] :
  print('hon')
elif (N % 10) in [0, 1, 6, 8] :
  print('pon')
else :
  print('bon')
Buggy code:
line = int(input())

if line%10 ==3:
  print("ban")
elif line%10 ==0 or line%10 ==1 or line%10 ==6 or line%10 ==8:
  print("pon")
else:
  print("hon")

Fixed code:
line = int(input())

if line%10 ==3:
  print("bon")
elif line%10 ==0 or line%10 ==1 or line%10 ==6 or line%10 ==8:
  print("pon")
else:
  print("hon")
Buggy code:
h = [2,4,5,7,9]
p = [0,1,6,8]
b = [3]

n = input()

n = n % 10

if n in h:
  print 'hon'
elif n in p:
  print 'pon'
elif n in b:
  print 'bon'

Fixed code:
h = [2,4,5,7,9]
p = [0,1,6,8]
b = [3]

n = int(input())

n = n % 10

if n in h:
  print('hon')
elif n in p:
  print('pon')
elif n in b:
  print('bon')
Buggy code:
def main():
    n = int(input())
    if n % 10 == 3:
        print('bon')
    elif n % 10 == 0 or n % 10 == 1 or n % 10 == 6 or n % 10 == 8:
        print('pon')
    else:
        print('hon')
main(

Fixed code:
n = int(input())%10

if n==3:
    print("bon")
elif n==0 or n==1 or n==6 or n==8:
    print("pon")
else:
    print("hon")
Buggy code:
n = input()

if n[lne(n) - 1] == '3':
  print('bon')
elif n[len(n) - 1] == '0' or '1' or '6' or '8':
  print('pon')
else:
  print('hon')

Fixed code:
n=input()
if n[-1]=="3":
  print("bon")
elif n[-1]=="0" or n[-1]=="1" or n[-1]=="6" or n[-1]=="8":
  print("pon")
else:
  print("hon")
Buggy code:
n = int(input()[-1])
if n in [2, 4, 5, 7, 9]: print('hon')
else if n in [0, 1, 6, 8]: print('pon')
else: print('bon')

Fixed code:
n = int(input()[-1])
if n in [2, 4, 5, 7, 9]: print('hon')
elif n in [0, 1, 6, 8]: print('pon')
else: print('bon')
Buggy code:
s = str(input())[-1]
if s == '3':
  print('hon')
elif s in ['0','1','6','8']:
  print('pon')
else:
  print('pon')

Fixed code:
s = str(input())[-1]
if s == '3':
  print('bon')
elif s in ['0','1','6','8']:
  print('pon')
else:
  print('hon')
Buggy code:
last = int(input()[-1])
     
if last in [2,4,5,7,9]:
  print('hon')
elif last in [0,1,6,8]:
  print('pon')
else:
  print('hon')

Fixed code:
last = int(input()[-1])
     
if last in [2,4,5,7,9]:
  print('hon')
elif last in [0,1,6,8]:
  print('pon')
else:
  print('bon')
Buggy code:
n=str(input())
x=len(n)
if n[x-1]=='2' or '4' or '5' or '7' or '9':
  print('hon')
elif n[x-1]=='0' or '1' or '6' or '8':
  print('pon')
else:
  print('bon')
  

Fixed code:
n = str(input())

if len(n) == 1:
    nd = n
else:
    nd = n[-1:]

if nd == "2" or nd == "4" or nd == "5" or nd == "7" or nd == "9":
    print('hon')
elif nd == "0" or nd == "1" or nd == "6" or nd == "8":
    print('pon')
else:
    print('bon')
Buggy code:
class ATherefore:
    def solve(self, tc=0):
        n = int(input())
        if n % 10 in [2, 4, 5, 7, 9]:
            print("hon")
        elif n % 10 in [0, 1, 6, 8]:
            print("pon")
        else:
            print("bon")

x = Atherefore()
x.solve()

Fixed code:
class ATherefore:
    def solve(self, tc=0):
        n = int(input())
        if n % 10 in [2, 4, 5, 7, 9]:
            print("hon")
        elif n % 10 in [0, 1, 6, 8]:
            print("pon")
        else:
            print("bon")


x = ATherefore()
x.solve()
Buggy code:
num=input()
one=num[len(num)-1]
if one=="2" or one=="4" or one=="5" or one=="7" or one=="9":
    print("hon")
elif one=="0" or one=="1" or one=="6" or one=="8":
    print("pon")
else:
    print("boon")

Fixed code:
num=input()
one=num[len(num)-1]
if one=="2" or one=="4" or one=="5" or one=="7" or one=="9":
    print("hon")
elif one=="0" or one=="1" or one=="6" or one=="8":
    print("pon")
else:
    print("bon")
Buggy code:
import sys
import os

n = sys.argv[1]
n = n[-1]

if n == "2" or n == "4" or n == "5" or n == "7" or n == "9":
    print("hon")
elif n == "0" or n == "1" or n == "6" or n == "8":
    print("pon")
elif n == "3":
    print("bon")

sys.exit()


Fixed code:
import sys
import os

n = input()
n = n[-1]

if n == "2" or n == "4" or n == "5" or n == "7" or n == "9":
    print("hon")
elif n == "0" or n == "1" or n == "6" or n == "8":
    print("pon")
elif n == "3":
    print("bon")

sys.exit()
Buggy code:
#N, M = map(int, input().split())
#A = list(map(int, input().split()))
#S = str(input())
N = str(input())
hon = [2, 4, 5, 7, 9]

#print(N[-1])

if N[-1] in hon:
  print("hon")
elif N[-1] == str(3):
  print("bon")
else:
  print("pon")

Fixed code:
#N, M = map(int, input().split())
#A = list(map(int, input().split()))
#S = str(input())
N = str(input())
hon = ["2", "4", "5", "7", "9"]

#print(N[-1])

if N[-1] in hon:
  print("hon")
elif N[-1] == str(3):
  print("bon")
else:
  print("pon")
Buggy code:
n = int(input())
if n in [2,4,5,7,9]:
  print('hon')
elif n in [0,1,6,8]:
  print('pon')
else:
  print('bon')

Fixed code:
n = int(input())
n %= 10

if n in [2, 4, 5, 7, 9]:
    print("hon")
elif n in [0, 1, 6, 8]:
    print("pon")
else:
    print("bon")
Buggy code:
n = int(input())
x = n%10
if (x == 2, or x == 4, or x == 5, or x == 7, or x == 9):
  print("hon")
elif (x == 0, or x == 1, or x == 6, or x == 8):
  print("pon")
else:
  print("bon")

Fixed code:
n = int(input())
x = n%10
if (x == 2 or x == 4 or x == 5 or x == 7 or x == 9):
  print("hon")
elif (x == 0 or x == 1 or x == 6 or x == 8):
  print("pon")
else:
  print("bon")