Company: epam
Difficulty: medium
Description: You are given a string of characters. Your mission is to remove any characters that appear directly next to each other, leaving unique characters in a row. Input Format: A single line containing the string S. Constraints: The string S consists of only lowercase English alphabets. The length of S is at most 10 5 . Examples: Example 1: Input: abbcccdd Output: abcd Explanation: In the given string, "bb", "ccc", and "dd" are consecutive duplicate characters. After removing these consecutive duplicates, the resultant string is "abcd".