def iso7064mod37_hybrid_36(source: str) -> str:
    """

    iso7064mod37_HYBRID_36校验算法

    :param source: 需要添加校验的字符串
    :return: 校验位

    """
    alphabet = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*"
    m1 = 36
    m2 = 37

    p = m1
    n = len(source) + 1

    i = n
    while i >= 2:
        s = p + alphabet.index(source[n - i].upper())
        if s % m1 == 0:
            c = m1
        else:
            c = s % m1
        p = (c * 2) % m2
        i -= 1
    return alphabet[(m1 + 1 - p % m1) % m1]