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 PHP (judge verdict: WA: Presentation Error)

<?php

$conv = array_merge(
  array_combine(range("a", "z"), range("A", "Z")),
  array_combine(range("A", "Z"), range("a", "z"))
);

$input = trim(fgets(STDIN));
$data_size = strlen($input);

for ($i=0; $i<$data_size; $i++) {
  if (in_array($input[$i], $conv)) {
    echo $conv[$input[$i]];
  } else {
    echo $input[$i];
  }
}