using System; using System.IO; using System.Linq; using System.Collections; using System.Collections.Generic; using System.Numerics; using System.Diagnostics; using System.Text; using System.Text.RegularExpressions; using System.Threading.Tasks; using static System.Math; using static System.Console; namespace yukicoder { class Program { static void Main() { var t = Console.ReadLine().Split().ToArray(); var w = int.Parse(t[0]); var h = int.Parse(t[1]); var c = t[2]; var str = c; for (var i = 0; i < h; i++) { for (var j = 0; j < w; j++) { if (j == 0) { continue; } if (str[j-1] == 'B') { str += 'W'; } else { str += 'B'; } } Console.WriteLine(str); if(str[0] == 'B') { str = "W"; } else { str = "B"; } } } } }