@w=glob<>;/ /?(${$`}-=${C^R^$`}==$')%=$w[/R/]:print$C+$R&1?black:white for reverse<>