#C11611. Remove Consecutive Duplicate Characters

    ID: 40947 Type: Default 1000ms 256MiB

Remove Consecutive Duplicate Characters

Remove Consecutive Duplicate Characters

Given a string \(S\), your task is to remove all consecutive duplicate characters so that each character appears only once consecutively. For example, if \(S\) is "aabbccdde", the output should be "abcde".

You need to write a program that reads a string from standard input and outputs the processed string to standard output.

inputFormat

A single line containing the string (S). The input is read from standard input (stdin).

outputFormat

Output a single line: the string after removing all consecutive duplicate characters. The output should be written to standard output (stdout).## sample

aabbccdde
abcde