use proconio::input; fn main() { input! { w:usize, h:usize, mut word:char, } let next:String; for _ in 0..h { for _ in 0..w { print!("{}",word); word = if word == 'B' {'W'} else {'B'}; } println!(""); word = if word == 'B' {'W'} else {'B'}; } }