import java.io.*;
import java.util.*;
 
class Main {
 
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] c_array=br.readLine().toCharArray();
        for(char c:c_array){
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        }System.out.println();
    }
}
  import java.io.*; io.* java import java.util.*; util.* java class Main {
 
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] c_array=br.readLine().toCharArray();
        for(char c:c_array){
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        }System.out.println();
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] c_array=br.readLine().toCharArray();
        for(char c:c_array){
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        }System.out.println();
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] c_array=br.readLine().toCharArray();
        for(char c:c_array){
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        }System.out.println();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] c_array=br.readLine().toCharArray(); c_array br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br for(char c:c_array){
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        } char c c_array {
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        } {
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        } if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c); 'a'<=c&&c<='z' 'a'<=c 'a' c c<='z' c 'z' { System.out.printf("%c",c-'a'+'A'); } System.out.printf("%c",c-'a'+'A') System.out.printf System.out System System.out "%c" c-'a'+'A' c-'a' c 'a' 'A' if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c); 'A'<=c&&c<='Z' 'A'<=c 'A' c c<='Z' c 'Z' { System.out.printf("%c",c-'A'+'a'); } System.out.printf("%c",c-'A'+'a') System.out.printf System.out System System.out "%c" c-'A'+'a' c-'A' c 'A' 'a' System.out.print(c) System.out.print System.out System System.out c System.out.println() System.out.println System.out System System.out String[] args args
import java.io.*;
import java.util.*;
 
class Main {
 
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char[] c_array=br.readLine().toCharArray();
        for(char c:c_array){
            if('a'<=c&&c<='z'){ System.out.printf("%c",c-'a'+'A'); }
            else if('A'<=c&&c<='Z'){ System.out.printf("%c",c-'A'+'a'); }
            else System.out.print(c);
        }System.out.println();
    }
}
 