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

t = list("AKIHABARA")

if len(s) > len(t):
    print("NO")
    exit()
    
if len(s) < 5:
    print("NO")
    exit()

while True:
    cnt = 0
    for i in range(8):
        if s[cnt] == t[i]:
            cnt += 1
            continue
        elif t[i] == "A":
            s.insert(i, "A")
            break
        else:
            print("NO")
            exit()
    else:
        break
        
print("YES")

Fixed submission:
s = input()

check = ["KIHBR","KIHBRA","KIHBAR","KIHBARA","KIHABR","KIHABRA","KIHABAR","KIHABARA","AKIHBR","AKIHBRA","AKIHBAR","AKIHBARA","AKIHABR","AKIHABRA","AKIHABAR","AKIHABARA"]

if s in check:
    print("YES")
else:
    print("NO")

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

t = list("AKIHABARAw")
cnt = 0

if len(s) > len(t)-1:
    print("NO")
    exit()

for i in range(len(s)):
    if s[i] == t[cnt]:
        cnt += 1
    else:
        if t[cnt] == "A":
            cnt += 1
            if t[cnt] == s[i]:
                cnt += 1
            else:
                print("NO")
                eixt()
        else:
            print("NO")
            exit()
            
if cnt >= 7:
    print("YES")
else:
    print("NO")
            

Fixed submission:
s = input()

check = ["KIHBR","KIHBRA","KIHBAR","KIHBARA","KIHABR","KIHABRA","KIHABAR","KIHABARA","AKIHBR","AKIHBRA","AKIHBAR","AKIHBARA","AKIHABR","AKIHABRA","AKIHABAR","AKIHABARA"]

if s in check:
    print("YES")
else:
    print("NO")

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

t = list("AKIHABARAz")
cnt = 0

if len(s) > len(t)-1:
    print("NO")
    exit()

for i in range(len(s)):
    if s[i] == t[cnt]:
        cnt += 1
        continue
    else:
        if t[cnt] == "A":
            cnt += 1
            if t[cnt] == s[i]:
                cnt += 1
                continue
            else:
                print("NO")
                eixt()
        else:
            print("NO")
            exit()
            
if cnt >= 7:
    print("YES")
else:
    print("NO")
            

Fixed submission:
s = input()

check = ["KIHBR","KIHBRA","KIHBAR","KIHBARA","KIHABR","KIHABRA","KIHABAR","KIHABARA","AKIHBR","AKIHBRA","AKIHBAR","AKIHBARA","AKIHABR","AKIHABRA","AKIHABAR","AKIHABARA"]

if s in check:
    print("YES")
else:
    print("NO")

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

t = list("AKIHABARA")
cnt = 0

if len(s) > len(t):
    print("NO")
    exit()

for i in range(len(s)):
    if s[i] == t[cnt]:
        cnt += 1
        continue
    else:
        if t[cnt] == "A":
            cnt += 1
            if t[cnt] == s[i]:
                cnt += 1
                continue
            else:
                print("NO")
                eixt()
        else:
            print("NO")
            exit()
            
if cnt >= 7:
    print("YES")
else:
    print("NO")
            

Fixed submission:
s = input()

check = ["KIHBR","KIHBRA","KIHBAR","KIHBARA","KIHABR","KIHABRA","KIHABAR","KIHABARA","AKIHBR","AKIHBRA","AKIHBAR","AKIHBARA","AKIHABR","AKIHABRA","AKIHABAR","AKIHABARA"]

if s in check:
    print("YES")
else:
    print("NO")

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

t = list("AKIHABARA")
cnt = 0

for i in range(len(s)):
    if s[i] == t[cnt]:
        cnt += 1
        continue
    else:
        if t[cnt] == "A":
            cnt += 1
            if t[cnt] == s[i]:
                cnt += 1
                continue
            else:
                print("NO")
                eixt()
        else:
            print("NO")
            exit()
            
if cnt >= 7:
    print("YES")
else:
    print("NO")
            

Fixed submission:
s = input()

check = ["KIHBR","KIHBRA","KIHBAR","KIHBARA","KIHABR","KIHABRA","KIHABAR","KIHABARA","AKIHBR","AKIHBRA","AKIHBAR","AKIHBARA","AKIHABR","AKIHABRA","AKIHABAR","AKIHABARA"]

if s in check:
    print("YES")
else:
    print("NO")