D - 重複を削除 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MiB

問題文

英小文字からなる文字列 S が与えられます。

S に複数回現れる文字を削除し、残った文字を順序を保って連結することで得られる文字列を求めてください。

制約

  • S は長さ 1 以上 100 以下の英小文字からなる文字列

入力

入力は以下の形式で標準入力から与えられる。

S

出力

答えを出力せよ。


入力例 1

takahashi

出力例 1

tksi

S に複数回現れる文字は a, h2 つです。S から a, h を削除して残った文字を順序を保って連結すると tksi となります。


入力例 2

abba

出力例 2


出力するべき文字列が空文字列になることもあります。


入力例 3

atcoder

出力例 3

atcoder

Problem Statement

You are given a string S consisting of lowercase English letters.

Find the string obtained by removing the characters that occur multiple times in S and joining the remaining ones in order.

Constraints

  • S is a string of length between 1 and 100, inclusive, consisting of lowercase English letters.

Input

The input is given from Standard Input in the following format:

S

Output

Print the answer.


Sample Input 1

takahashi

Sample Output 1

tksi

The characters that occur multiple times in S are a and h. By removing a and h from S and joining the remaining characters in order, we obtain tksi.


Sample Input 2

abba

Sample Output 2


The string to print may be empty.


Sample Input 3

atcoder

Sample Output 3

atcoder