776. Eliminate Duplicate Characters

0

Medium

Given a string, create a recursive function that returns a new string with all consecutive duplicate characters reduced to a single character. For example, if the input is 'hello', the function should return 'helo'. Print the resulting string.

Input Format

Enter the string

Output Format

Display the resulting string

Example

Input

hello

Output

helo

Constraints

None
Loading...

View Submissions

Console