def convert_to(input, target):
    """
    Convert from integer to target-base string representation
    :param input: Integer
    :param target: all digits for a base
    :return: string representation in Base n
    """
    result = ''
    base = len(target)
    while True:
        result = '%s%s' % (str(target[input % base]),result)
        input  = input // base
        if not (input > 0):
            break
    return result