/*
You have been given a String S consisting of uppercase and lowercase English alphabets. You need to change the case of each alphabet in this String. That is, all the uppercase letters should be converted to lowercase and all the lowercase letters should be converted to uppercase. You need to then print the resultant String to output.

Input Format
The first and only line of input contains the String S

Output Format
Print the resultant String on a single line.

Constraints 
1<=S<=100 where S denotes the length of string S.

SAMPLE OUTPUT   
abcdE
UPLOAD ANOTHER
ABCDe
*/

package main

import (
    "fmt"
)

func main() {
    var input string
    fmt.Scan(&input)
    inputByte := []rune(input)
    for i:=0 ; i <len(input) ;i++ {
     	if(inputByte[i]>=65 && inputByte[i]<=90){
		inputByte[i] = inputByte[i] + 32
	} else if(inputByte[i]>=97 && inputByte[i]<=122){
		inputByte[i] = inputByte[i] -32
	}   
    }
    fmt.Println(string(inputByte))
}