How do I check for adjacent characters and if they match, delete one?

Where did this input data will comes from? @Vlad_Svitelskyi, Like from an excel file