private void restore(char [] cs, int index, int[] dq, int qIndex, List<String> result ){
        if (qIndex == 3 && cs.length-index>3){
            return;
        }
        else if (qIndex==4 ){
            if (index > cs.length-1){
                StringBuilder bldr = new StringBuilder();
                for (int i=0; i<4; i++){
                    bldr.append(dq[i]).append(".");
                }
                result.add(bldr.substring(0, bldr.length()-1));

            }
            return;
        }

        for (int len =0; len <3 && index+len<cs.length; len++){
            int num = getNum(cs, index, index+len);
            if (num<0 || num>255){
                continue;
            }
            dq[qIndex]=num;
            restore(cs, index+len+1, dq, qIndex+1, result);

        }

    }