private String getResult(String input,String result)
    {
       int len=input.length();
       for(int i=0;i<len-1;i++)
       {
           int encodedDigit = Character.getNumericValue(input.charAt(i));
           int decodedDigit = Character.getNumericValue(result.charAt(i));
           if(i>0)
           {
               decodedDigit+= Character.getNumericValue(result.charAt(i-1));
           }
           
           if(encodedDigit==decodedDigit)
           {
               result+=String.valueOf("0");
           }
           else if(encodedDigit==decodedDigit+1)
           {
               result+=String.valueOf("1");
           }
           else
               return "NONE";
           
       }
       int resultAnswer = Character.getNumericValue(result.charAt(len-1));
       int lastInputDigit = Character.getNumericValue(input.charAt(len-1));
       if(len>1)
       {
           resultAnswer+= Character.getNumericValue(result.charAt(len-2));
       }
       if(resultAnswer != lastInputDigit)
           return "NONE";
       return result;
    }