LearnPy Hub
← Arena
AdvancedRating 1800

Remove Repeated Letters

Remove letters so that every different letter appears exactly once, and the result is the alphabetically smallest possible (keeping the original order). Print it.

Input

One string.

Output

One string.

Sample 1

Input
bcabc
Output
abc

Sample 2

Input
cbacdcbc
Output
acdb
solution.py
Output appears here
Remove Repeated Letters · Python Arena problem · LearnPy Hub