fun main(arr: Array<String>) {
    println(if(solve(readLine()!!)) "YES" else "NO")
}

fun solve(s:String):Boolean {
    val target = "AKIHABARA".toList()
    val tmp = mutableListOf<Char>()
    tmp.addAll(s.toList())
    for(i in target.indices) {
        if(i > tmp.lastIndex || target[i] != tmp[i]) {
            if(target[i] == 'A') {
                tmp.add(i, 'A')
            } else {
                return false
            }
        }
    }
    return target.joinToString("") == tmp.joinToString("")
}