Find last two elemans "00"

w =


    
Logic

0 1
> A B A
 B C A
* C C A

    
0 1
> a b a
 b c a
* c ϕ ϕ