List-sublist structure error

Good day.
I have a somewhat peculiar problem, I attach an image of my problem.
What I want is to continue maintaining the original structure of the sublists.
Could someone help me, thank you very much.

Try this solution

OUT = IN[0]
index = IN[1]
replace = IN[2] 

for i,j in zip(index,replace):
    OUT[i] = j


list.dyn (17.0 KB)

Try appending a list containing an empty string onto each list, that would assure you keep data going forward.