def apply_mask_v2(mask: str, address: str) -> str:
    """
    DOCTEST

    >>> apply_mask_v2(mask='000000000000000000000000000000X1001X', address='000000000000000000000000000000101010')
    '000000000000000000000000000000X1101X'
    """
    output = "".join([address[i] if mask[i] == "0" else mask[i] for i, _ in enumerate(mask)])
    return output