$/=words;put substr "BW"x$0,($_+$2.ord)%2,$0 for ^$1