public static void doLuckString(String str){
        int i=0,j=0,k=0;
        int fib1=1,fib2=1;
        int difnum = 0;

        //int num[] = new int[str.length()]; //number of different characters!

        //num[0] = 1;

        while (i<str.length()) {
            j = i;  //start from location of i.

            while (j < str.length()) {
                if (i == j) {
                    //num[j] = 1;
                    difnum = 1;
                    fib1 = 1;
                    fib2 = 2;
                } else {
                    for (k = i; k < j; k++) {//
                        if (str.charAt(k) == str.charAt(j)) {
                            break;
                        }
                    }//end of different
                    if (k >= j) {
                        difnum++;

                        if( difnum > fib1 ){
                            int tmp = fib1;
                            fib1 = fib2;
                            fib2 = tmp + fib1;
                        }
                    }
                }//end of update num
                if (difnum == fib1 ) {

                    String substr = str.substring(i, j + 1);
                    String str1 = str.substring(0,j);
                    if( !str1.contains(substr)) {
                        System.out.println(substr);
                    }
                }
                j++; //move to next character!
            }//end of while
            i++;
        };

    }