#include <math.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <limits.h>
#include <stdbool.h>
int main()
{
    int a0,q,h,a,c,k,e,r,t; 
    char s[20];
    scanf("%d",&q);
    for(a0 = 0; a0 < q; a0++)
    {
        char* s = (char *)malloc(512000 * sizeof(char));
        scanf("%s",s);
    }
        // your code goes here
        for(a0 = 0; a0 < q; a0++)
            {
        switch(s[a0])
        {
            case 'h' : h++;
            break;
            case 'a' : a++;
            break;
            case 'c' : c++;
            break;
            case 'k' : k++;
            break;
            case 'e' : e++;
            break;
            case 'r' : r++;
            break;
            case 't' : t++;
            break;
        }
            }
       for(a0=0;a0<q;a0++)
{
        if(h>=2 && a>=2 && e>=2 && r>=2 && c>=1 && k>=1 && t>=1)
        {
            /*count++;
            h=h-2;
            a=a-2;
            e=e-2;
            r=r-2;
            c=c-1;
            k=k-1;
            t=t-1;( */
            printf("YES/n");
        }
    else
        printf("NO");
    
}
     
    
    return 0;
}