private ArrayList<Integer> getNineInvertedDigits(int value) {
        ArrayList<Integer> result = new ArrayList<Integer>();
        if (value == 0)
            result.add(0);
        else
            while (value > 0) {
                int digit = value % 9;
                result.add(digit);
                value = value / 9;
            }
        return result;
    }