def base_conv(n, input_base=10, output_base=10):
    """
    Converts a number n from base input_base to base output_base.
    
    The following symbols are used to represent numbers:
    0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ
    n can be an int if input_base <= 10, and a string otherwise.
    The result will be a string.
    """
    numbers = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
    
    ## base 10 conversion
    n = str(n)
    size = len(n)
    baseten = 0
    
    for i in range(size):
        baseten += numbers.index(n[i]) * input_base ** (size - 1 - i)
    
    ## base output_base conversion
    # we search the biggest number m such that n^m < x
    max_power = 0
    while output_base ** (max_power + 1) <= baseten:
        max_power += 1
    
    result = ""
    for i in range(max_power + 1):
        coeff = baseten / (output_base ** (max_power - i))
        baseten -= coeff * (output_base ** (max_power - i))
        result += numbers[coeff]
    
    return result