#C6432. Remove Consecutive Duplicates

    ID: 50192 Type: Default 1000ms 256MiB

Remove Consecutive Duplicates

Remove Consecutive Duplicates

Given a string S, remove the minimum number of characters such that the resulting string does not contain any consecutive repeating characters. In other words, for every index \(i\) (with \(1 \le i < |S|\)), the condition \(S[i] \neq S[i-1]\) must hold.

For example, if \(S = \texttt{aaabbbccc}\), then the answer is \(\texttt{abc}\). Your task is to implement a program that reads the input from stdin and writes the result to stdout.

inputFormat

The input consists of a single line containing the string S. The string may be empty.

Input is read from stdin.

outputFormat

Output the string after removing all consecutive duplicate characters. The result should be printed on stdout.

## sample
aaabbbccc
abc