using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ForYukicoder { //No.82 市松模様 class Program { static void Main(string[] args) { string[] str = Console.ReadLine().Split(); int W = int.Parse(str[0]); int H = int.Parse(str[1]); char C = char.Parse(str[2]); //----------------------------- bool isWhiteRow = (C.Equals('W')) ? true : false; bool isWhiteColumn; string str2; for (int i = 0; i < H; i++) { isWhiteColumn = isWhiteRow; str2 = ""; for (int j = 0; j < W; j++) { str2 += isWhiteColumn ? "W" : "B"; isWhiteColumn = isWhiteColumn ? false : true; } isWhiteRow = isWhiteRow ? false : true; Console.WriteLine(str2); } } } }