using System; using System.Text; class Program { static void Main(string[] args) { var inputString = Console.ReadLine(); var inputArray = inputString.ToCharArray(); var outputString = new StringBuilder(); foreach (var c in inputArray) { if (char.IsUpper(c)) { outputString.Append(c.ToString().ToLower()); } else { outputString.Append(c.ToString().ToUpper()); } } Console.WriteLine(outputString.ToString()); } }