using System; using System.Collections.Generic; using System.Linq; class Program { static string InputPattern = "InputX"; static List GetInputList() { var WillReturn = new List(); if (InputPattern == "Input1") { WillReturn.Add("2 8"); WillReturn.Add("..yiwiy9"); WillReturn.Add("9yiwiy.."); //..yiwiY9 //9Yiwiy.. } else { string wkStr; while ((wkStr = Console.ReadLine()) != null) WillReturn.Add(wkStr); } return WillReturn; } static long[] GetSplitArr(string pStr) { return (pStr == "" ? new string[0] : pStr.Split(' ')).Select(pX => long.Parse(pX)).ToArray(); } static void Main() { List InputList = GetInputList(); for (int I = 1; I <= InputList.Count - 1; I++) { string CurrStr = InputList[I]; CurrStr = CurrStr.Replace("9yiwiy", "B"); CurrStr = CurrStr.Replace("yiwiy9", "A"); CurrStr = CurrStr.Replace("A", "yiwiY9"); CurrStr = CurrStr.Replace("B", "9Yiwiy"); Console.Write(CurrStr); if (I < InputList.Count - 1) { Console.WriteLine(); } } } }