I don't really have an idea about how to do that, but I have some questions:

What determines which letter in an outline around the same letters is the one that stays in place? In the upper left corner, it's the upper one of two A's [blue-circled], but one position to the right and down, it's the lower one of two C's [yellow].
Shouldn't the red-circled segment, and one of the D's in the enclosed areas, be removed?
Does the difference in size of letters matter? In the row of 3 D's to the right of the A at the top, the one that stays, which is the larger size in the original, has become the smaller size [or, the smaller one in the right end of the area that stayed has also moved over].
In the drawing, there's a green shape wandering around among the letters. Is that relevant?
Kent Cooper, AIA