public static boolean hasPAT(String str){
        boolean hasPp = false, hasAa = false, hasTt = false, hasPAT = false;
        char[] chars = str.toCharArray();
        for (int i =0; i < chars.length; i++){
            if (chars[i] == 'P' ){
                hasPp = true;
            }else if(chars[i] == 'A' ){
                hasAa = true;
            }else if (chars[i] == 'T'){
                hasTt = true;
            }else {
                return hasPAT;
            }
        }
        hasPAT = hasPp && hasAa && hasTt;
        if (hasPAT){
            if (str.contains("PAT")){
                hasPAT = true;
            }else if (str.contains("PAAT")){
                hasPAT = true;
            }else {
                hasPAT = false;
            }
        }
        return hasPAT;
    }