Language: C++

#include<bits/stdc++.h>
using namespace std; 
int main()
{char a[100];
 int b=0,c=0,d=0,e=0,f=0;
 cin>>a;
 for(int i=0;i<strlen(a);i++)
    {if(a[i]=='K')
       {b=i;
        break;}
	}
 for(int i=b+1;i<strlen(a);i++)
    {if(a[i]=='I')
       {c=i;
        break;}
	}
 for(int i=c+1;i<strlen(a);i++)
    {if(a[i]=='H')
       {d=i;
        break;}
	}
 for(int i=d+1;i<strlen(a);i++)
    {if(a[i]=='B')
       {e=i;
        break;}
	}
 for(int i=e+1;i<strlen(a);i++)
    {if(a[i]=='R')
       {f=i;
        break;}
	}
 if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
    cout<<"YES"<<endl;
 else
    cout<<"NO"<<endl;
}

Compiler output:
a.cc:32:141: warning: multi-character literal with 18 characters exceeds 'int' size of 4 bytes
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                                                                                                                             ^~~~~~~~~~~~~~~~~~~~~
a.cc:32:162: warning: missing terminating ' character
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                                                                                                                                                  ^
a.cc:32:162: error: missing terminating ' character
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                                                                                                                                                  ^~~~
a.cc: In function 'int main()':
a.cc:32:79: error: lvalue required as left operand of assignment
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                                                 ~~~~~~~~~~~~~~^~~~~~~~
a.cc:32:109: error: lvalue required as left operand of assignment
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                                                                               ~~~~~~~~~~~~~~^~~~~~~~
a.cc:32:141: error: unable to find character literal operator 'operator""A' with 'int' argument
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                                                                                                                             ^~~~~~~~~~~~~~~~~~~~~
a.cc:32:162: error: expected ')' before 'cout'
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                                                                                                            ~                                     ^
      |                                                                                                                                                                  )
   33 |     cout<<"YES"<<endl;
      |     ~~~~                                                                                                                                                          
a.cc:33:22: error: expected ')' before ';' token
   33 |     cout<<"YES"<<endl;
      |                      ^
      |                      )
a.cc:32:45: note: to match this '('
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |                                             ^
a.cc:33:22: error: expected ')' before ';' token
   33 |     cout<<"YES"<<endl;
      |                      ^
      |                      )
a.cc:32:4: note: to match this '('
   32 |  if(c!=0&&d!=0&&e!=0&&f!=0&&b+1==c&&c+1==d&&((d+1==e&&e+1==f)||(d+1==e&&e+2==f&&a[f-1]='A')||(d+2==e&&e+1==f&&a[e-1]='A')||(d+2==e&&a[e-1]=='A&&e+2==f&&a[f-1]='A')))
      |    ^