CF196A Lexicographically Maximum Subsequence

Description

You've got string $ s $ , consisting of only lowercase English letters. Find its lexicographically maximum subsequence. We'll call a non-empty string $ s[p_{1}p_{2}...\ p_{k}]=s_{p1}s_{p2}...\ s_{pk}(1

Input Format

The single line contains a non-empty string $ s $ , consisting only of lowercase English letters. The string's length doesn't exceed $ 10^{5} $ .

Output Format

Print the lexicographically maximum subsequence of string $ s $ .

Explanation/Hint

Let's look at samples and see what the sought subsequences look like (they are marked with uppercase bold letters). The first sample: aBaBBA The second sample: abbCbCCaCbbCBaaBA