def inference_masking(sequence: list[int], mask_token: int, max_vocabulary: int) -> list[int]:

    current_mask_token = max_vocabulary + 1

    for i in range(0, len(sequence)):

        if sequence[i] != mask_token:
            continue

        sequence[i] = current_mask_token
        current_mask_token += 1

    return sequence
