LearnPy Hub
← Arena
EasyRating 1000

Remove Adjacent Pairs

Repeatedly remove two adjacent equal letters. Print the final string, or EMPTY.

Input

One word.

Output

The result.

Sample 1

Input
abbaca
Output
ca

Sample 2

Input
azxxzy
Output
ay
solution.py
Output appears here
Remove Adjacent Pairs · Python Arena problem · LearnPy Hub