private String genNext(String crt) {
        int i = 0;
        int length = crt.length();
        
        String re = "";
        while (i < length) {
            char c = crt.charAt(i);
            int num = 0;
            while (i < length && crt.charAt(i) == c) {
                i++;
                num++;
            }
            re += (Integer.toString(num) + c);
        }
        return re;
    }