import java.io.*; import java.util.*; import java.text.*; import java.math.*; import java.util.regex.*; public class Solution { public static void main(String[] args) throws IOException { BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); int q = Integer.parseInt(in.readLine()); for(int a0 = 0; a0 < q; a0++){ String s = in.readLine(); char[] chr = s.toCharArray(); char[] name ={'h','a','c','k','e','r','r','a','n','k'}; int name_i=0; boolean found=false; for(int i=0;i