mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
23 lines
346 B
Python
23 lines
346 B
Python
def problem_p03523(input_data):
|
|
|
|
import re
|
|
|
|
s = eval(input_data)
|
|
|
|
pattern = re.compile("(A?KIHA?BA?RA?)")
|
|
|
|
ret = pattern.findall(s)
|
|
|
|
ret2 = pattern.findall("[^AKIHBR]")
|
|
|
|
# return (ret)
|
|
|
|
if ret is not None and len(ret) == 1 and len(ret[0]) == len(s):
|
|
|
|
ans = "YES"
|
|
|
|
else:
|
|
|
|
ans = "NO"
|
|
|
|
return ans
|