public static String columnIndexToColumnLabel(int index)
    {
        checkArgument(index >= 0, "index must be non-negative");

        // Fast path
        if (index < RADIX) {
            // A to Z
            return ALPHABETS[index];
        }
        else if (index < RADIX * RADIX + RADIX) {
            // AA to ZZ
            return ALPHABETS[index / RADIX - 1] + ALPHABETS[index % RADIX];
        }

        // Slow path
        int power = RADIX * RADIX;
        int sum = RADIX * RADIX + RADIX;
        int width = 3;
        int position = -1;
        while (index >= sum) {
            power = multiplyExact(power, RADIX);
            int max = addExact(power, sum);
            if (index < max) {
                position = index - sum;
                break;
            }
            sum = max;
            width += 1;
        }

        if (position == -1) {
            throw new IllegalStateException("Unexpected position value");
        }
        String[] chars = new String[width];
        for (int i = width - 1; i >= 0; i--) {
            chars[i] = ALPHABETS[position % RADIX];
            position /= RADIX;
        }
        return String.join("", chars);
    }
@Test
    public void testColumnIndexToColumnLabel()
    {
        assertEquals(columnIndexToColumnLabel(0), "A");
        assertEquals(columnIndexToColumnLabel(1), "B");
        assertEquals(columnIndexToColumnLabel(RADIX - 1), "Z");
        assertEquals(columnIndexToColumnLabel(RADIX), "AA");
        assertEquals(columnIndexToColumnLabel(RADIX + 1), "AB");
        assertEquals(columnIndexToColumnLabel(RADIX + RADIX - 1), "AZ");
        assertEquals(columnIndexToColumnLabel(RADIX + RADIX), "BA");
        assertEquals(columnIndexToColumnLabel(RADIX + RADIX + 1), "BB");
        assertEquals(columnIndexToColumnLabel(RADIX * RADIX + RADIX - 1), "ZZ");
        assertEquals(columnIndexToColumnLabel(RADIX * RADIX + RADIX), "AAA");
        assertEquals(columnIndexToColumnLabel(RADIX * RADIX + RADIX + 1), "AAB");
        assertEquals(columnIndexToColumnLabel(RADIX * RADIX * RADIX + RADIX * RADIX + RADIX - 1), "ZZZ");
        assertEquals(columnIndexToColumnLabel(RADIX * RADIX * RADIX + RADIX * RADIX + RADIX), "AAAA");
        assertEquals(columnIndexToColumnLabel(RADIX * RADIX * RADIX + RADIX * RADIX + RADIX + 1), "AAAB");
    }