fn main() { let stdin = std::io::read_to_string(std::io::stdin()).unwrap(); let mut stdin = stdin.split_ascii_whitespace(); let w: usize = stdin.next().unwrap().parse().unwrap(); let h: usize = stdin.next().unwrap().parse().unwrap(); let c: char = stdin.next().unwrap().parse().unwrap(); println!("{}", output(solve(w, h, c))); } fn solve(w: usize, h: usize, c: char) -> Vec> { (0..h) .map(|i| { (0..w) .map(|j| match ((i & 1) ^ (j & 1) == 1) ^ (c as u8 == b'B') { true => b'B', false => b'W', }) .collect() }) .collect() } fn output(ans: Vec>) -> String { ans.into_iter() .map(|x| String::from_utf8(x).unwrap()) .collect::>() .join("\n") }