using System; using System.Collections.Generic; using System.Linq; class Program { static string InputPattern = "Input4"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("4 3 B"); //BWBW //WBWB //BWBW } else if (InputPattern == "Input2") { WillReturn.Add("3 4 W"); //WBW //BWB //WBW //BWB } else if (InputPattern == "Input3") { WillReturn.Add("1 1 W"); //W } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static void Main() { List InputList = GetInputList(); string[] wkArr = InputList[0].Split(' ').ToArray(); int W = int.Parse(wkArr[0]); int H = int.Parse(wkArr[1]); char C = char.Parse(wkArr[2]); for (int Y = 0; Y <= H - 1; Y++) { for (int X = 0; X <= W - 1; X++) { bool IsEven = ((X + Y) % 2 == 0); if (C == 'B') Console.Write(IsEven ? 'B' : 'W'); else Console.Write(IsEven ? 'W' : 'B'); } Console.WriteLine(); } } }