public String countAndSay(int n) {
        if(n == 0) return "";
        String base = "1", say;
        for(int t = 1; t < n; t++){
            int pos = -1;
            say = "";
            for(int i = 0; i < base.length(); i++){
                if(pos == -1) pos = i;
                else if(base.charAt(i) != base.charAt(pos)){
                    say += (i - pos);
                    say += base.charAt(pos);
                    pos = i;
                }
            }
            if(pos != -1){
                say += (base.length() - pos);
                say += base.charAt(pos);
            }
            base = say;
        }
        return base;
    }