<>=~/((.)|\B)(?{$\+=$-=2*y!!!-$\+defined$2for$'^reverse$`})^/;print