get;$_=map {$_ <2*grep {[>] $_},[Z] $_},[X] (get.words xx 2)>>.permutations;say @$_.grep(?*)/$_