import java.io.*;

public class Main{
    public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    }

        
} import java.io.*; io.* java public class Main{
    public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    }

        
} Main public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        } char c str.toCharArray() str.toCharArray str {
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        } {
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        } if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            } Character.isLowerCase(c) Character.isLowerCase Character c {
                System.out.print(Character.toUpperCase(c));
            } System.out.print(Character.toUpperCase(c)) System.out.print System.out System System.out Character.toUpperCase(c) Character.toUpperCase Character c {
                System.out.print(Character.toLowerCase(c));
            } System.out.print(Character.toLowerCase(c)) System.out.print System.out System System.out Character.toLowerCase(c) Character.toLowerCase Character c System.out.println() System.out.println System.out System System.out String[]args args public class Main{
    public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    }

        
} public class Main{
    public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    }

        
} Main
import java.io.*;

public class Main{
    public static void main(String[]args) throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        for (char c: str.toCharArray()){
            if(Character.isLowerCase(c)){
                System.out.print(Character.toUpperCase(c));
            }else{
                System.out.print(Character.toLowerCase(c));
            }
        }
         System.out.println();
        
        
        
    }

        
}