Remove duplicates untill is not possible : I have an sring like this 

> anxxnbddc

I need a c# algorithm to remove duplicates untill is not possible 
I think i need an while and a for but i have no idea how to put the condition .
Results from the while should look like this order

 anxxnbddc>annbc>abc
and final string returned should be :
 abc

 
Help , thanks