def char_encode(num: int, is_lower=True) -> str:
    """
    Converts an integer to a character string \
    with elements from a-z or A-Z.

    :num: The integer base 10 to be converted.
    :return: The character base 26.
    """
    buffer = 97 if is_lower else 65
    result = "" if num != 0 else chr(buffer + num % 26)
    while num > 0:
        result = chr(buffer + num % 26) + result
        num //= 26
    return result