Problem:
Toggling Cases

Write a program which converts uppercase/lowercase letters to lowercase/uppercase for a given string.

Input

A string is given in a line.

Output

Print the converted string in a line. Note that you do not need to convert any characters other than alphabetical letters.

Constraints

The length of the input string < 1200

Sample Input

fAIR, LATER, OCCASIONALLY CLOUDY.

Sample Output

Fair, later, occasionally cloudy.

Solution in C# (judge verdict: Accepted)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _1_8_A
{
    class Program
    {
        static void Main(string[] args)
        {
            string _readLine = Console.ReadLine();
            char[] chars = _readLine.ToCharArray();
            string[] _readInitial = new string[_readLine.Length];
            for (int i = 0; i < _readLine.Length; i++) _readInitial[i] = _readLine.Substring(i, 1);
            string[] _largeInitial = { "A","B","C","D","E","F","G",
                                       "H","I","J","K","L","M","N","O","P","Q","R",
                                       "S","T","U","V","W","X","Y","Z"};
            string[] _smallInitial = { "a","b","c","d","e","f","g",
                                       "h","i","j","k","l","m","n","o","p","q","r",
                                       "s","t","u","v","w","x","y","z"};
            string answer = null;

            for (int j = 0; j < _readInitial.Length; j++)
            {
                for (int i = 0; i < 26; i++)
                {
                    if (_readInitial[j] == _largeInitial[i])
                    {
                        answer += _smallInitial[i];
                    }
                }
                for (int i = 0; i < 26; i++)
                {
                    if (_readInitial[j] == _smallInitial[i])
                    {
                        answer += _largeInitial[i];
                    }
                }

                if (_readInitial[j] == ","| _readInitial[j] == " "| _readInitial[j] == "."
                    | _readInitial[j] == "-"| _readInitial[j] == "("| _readInitial[j] == ")"
                    | _readInitial[j] == "1"| _readInitial[j] == "2"| _readInitial[j] == "3"
                    | _readInitial[j] == "4"| _readInitial[j] == "5"| _readInitial[j] == "6"
                    | _readInitial[j] == "7"| _readInitial[j] == "8"| _readInitial[j] == "9"
                    | _readInitial[j] == "0"| _readInitial[j] == "'")
                {
                    answer += _readInitial[j];
                }

            }
            Console.WriteLine(answer);
        }
    }
}