Can't Understand Editorial

Can someone please explain me the editorial for subtask 3…I can’t understand how the difference sequence is maintained…

Question - Sererja And Commands

Editorial - Editorial

//