#K76282. Remove Adjacent Duplicates

    ID: 34608 Type: Default 1000ms 256MiB

Remove Adjacent Duplicates

Remove Adjacent Duplicates

You are given a string s. Your task is to remove all adjacent duplicate characters from the string. The process should be repeated until no more adjacent duplicates remain, and the resulting string should be returned.

Example 1:

Input: "abbaca"
Output: "ca"

Example 2:

Input: "azxxzy"
Output: "ay"

Note: When two identical characters are adjacent, they cancel each other out.

inputFormat

The input consists of a single line containing the string s which only includes English letters. The length of the string can be large (up to 105 characters).

outputFormat

Output the final string after all adjacent duplicates have been removed.

## sample
abbaca
ca