#C10048. Toggle Case Transformation
Toggle Case Transformation
Toggle Case Transformation
Given a string S
of length N
, your task is to toggle the case of each alphabetical character. That is, convert all lowercase letters to uppercase and all uppercase letters to lowercase.
For example, if S = aBcDe
then the output should be AbCdE
. The program should read input from standard input and print the result to standard output.
Note: Only alphabetical characters are affected; other characters remain unchanged.
inputFormat
The input consists of two lines:
- The first line contains an integer
N
, the length of the string. - The second line contains the string
S
.
outputFormat
Output a single line containing the toggled string.
## sample5
aBcDe
AbCdE