public String getNext(String num){
        StringBuilder result = new StringBuilder();
        int i = 0;
        while(i < num.length()){
            int count = 1;
            while(i + 1 < num.length()){
                if(num.charAt(i) != num.charAt(i + 1)) break;
                count++;
                i++;
            }
            result.append(count);
            result.append(num.charAt(i));
            i++;
        }
        return result.toString();
    }