example ramaxxaxxhow we remove only last two repeated characters in string