import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        }
        System.out.println();
    }

} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        }
        System.out.println();
    }

} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        }
        System.out.println();
    } main {
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        }
        System.out.println();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        } char c str.toCharArray() str.toCharArray str {
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        } {
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        } if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c); 65 <= c && c <= 90 65 <= c 65 c c <= 90 c 90 System.out.print((char)(c + 32)) System.out.print System.out System System.out (char)(c + 32) c 32 if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c); 97 <= c && c <= 122 97 <= c 97 c c <= 122 c 122 System.out.print((char)(c - 32)) System.out.print System.out System System.out (char)(c - 32) c 32 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 public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        }
        System.out.println();
    }

} public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        }
        System.out.println();
    }

} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String str = sc.nextLine();
        for(char c : str.toCharArray()){
            if(65 <= c && c <= 90) System.out.print((char)(c + 32));
            else if(97 <= c && c <= 122) System.out.print((char)(c - 32));
            else System.out.print(c);
        }
        System.out.println();
    }

}