LearnPy Hub
← Arena
IntermediateRating 1300

Crush the Triples

Repeatedly remove any three or more equal adjacent characters until no such group remains. Print the result, or EMPTY.

Input

One string.

Output

The final string.

Sample 1

Input
aaabbbc
Output
c

Sample 2

Input
abbbaa
Output
EMPTY
solution.py
Output appears here
Crush the Triples · Python Arena problem · LearnPy Hub