I need to replace characters in a string. If a unique character occurs more than once, it should change it to ")". If it occurs once, it should change it to "