```
def removeDuplicates(x):
    for i in x:
        for j in x:
            if i!=j:
                return j
            else:
                return x

```

print(removeDuplicates("greeeetinngs"))

question:
a function that removes duplicate characters from a string . could yo help me please.
the output greeeetinngs
but output should be gretings. So, my output is wrong could you explain.