def xor_at_offset(a: bytes, b: bytes, n: int) -> bytes:
    """XOR b into a at an offset of n bytes."""
    tmp = bytearray(a)
    for i, v in enumerate(b):
        tmp[i + n] ^= v
    return bytes(tmp)