import java.util.Scanner;

public class Main {
    
    public static void main(String[] args){
        
        Scanner scan=new Scanner(System.in);
        
        char[] text=new char[1200];
        String in="";
        String out="";
        
        in=scan.nextLine();
        text=in.toCharArray();
        
        for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        }
        
        out=String.valueOf(text);
        System.out.println(out);
        
    }   
     
} import java.util.Scanner; Scanner java.util public class Main {
    
    public static void main(String[] args){
        
        Scanner scan=new Scanner(System.in);
        
        char[] text=new char[1200];
        String in="";
        String out="";
        
        in=scan.nextLine();
        text=in.toCharArray();
        
        for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        }
        
        out=String.valueOf(text);
        System.out.println(out);
        
    }   
     
} Main public static void main(String[] args){
        
        Scanner scan=new Scanner(System.in);
        
        char[] text=new char[1200];
        String in="";
        String out="";
        
        in=scan.nextLine();
        text=in.toCharArray();
        
        for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        }
        
        out=String.valueOf(text);
        System.out.println(out);
        
    } main {
        
        Scanner scan=new Scanner(System.in);
        
        char[] text=new char[1200];
        String in="";
        String out="";
        
        in=scan.nextLine();
        text=in.toCharArray();
        
        for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        }
        
        out=String.valueOf(text);
        System.out.println(out);
        
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) char[] text=new char[1200]; text new char[1200] 1200 String in=""; in "" String out=""; out "" in=scan.nextLine() in scan.nextLine() scan.nextLine scan text=in.toCharArray() text in.toCharArray() in.toCharArray in for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        } int i=0; int i=0; i 0 i<text.length i text.length text text.length i++ i++ i {
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        } {
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        } if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            } Character.isUpperCase(text[i]) Character.isUpperCase Character text[i] text i {
                text[i]=Character.toLowerCase(text[i]);
            } text[i]=Character.toLowerCase(text[i]) text[i] text i Character.toLowerCase(text[i]) Character.toLowerCase Character text[i] text i if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            } Character.isLowerCase(text[i]) Character.isLowerCase Character text[i] text i {
                text[i]=Character.toUpperCase(text[i]);
            } text[i]=Character.toUpperCase(text[i]) text[i] text i Character.toUpperCase(text[i]) Character.toUpperCase Character text[i] text i out=String.valueOf(text) out String.valueOf(text) String.valueOf String text System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main {
    
    public static void main(String[] args){
        
        Scanner scan=new Scanner(System.in);
        
        char[] text=new char[1200];
        String in="";
        String out="";
        
        in=scan.nextLine();
        text=in.toCharArray();
        
        for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        }
        
        out=String.valueOf(text);
        System.out.println(out);
        
    }   
     
} public class Main {
    
    public static void main(String[] args){
        
        Scanner scan=new Scanner(System.in);
        
        char[] text=new char[1200];
        String in="";
        String out="";
        
        in=scan.nextLine();
        text=in.toCharArray();
        
        for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        }
        
        out=String.valueOf(text);
        System.out.println(out);
        
    }   
     
} Main
import java.util.Scanner;

public class Main {
    
    public static void main(String[] args){
        
        Scanner scan=new Scanner(System.in);
        
        char[] text=new char[1200];
        String in="";
        String out="";
        
        in=scan.nextLine();
        text=in.toCharArray();
        
        for(int i=0;i<text.length;i++){
            if(Character.isUpperCase(text[i])){
                text[i]=Character.toLowerCase(text[i]);
            }else if(Character.isLowerCase(text[i])){
                text[i]=Character.toUpperCase(text[i]);
            }
        }
        
        out=String.valueOf(text);
        System.out.println(out);
        
    }   
     
}