import java.util.*;

public class Main {
    public static void main( String args[] ) {
        Scanner scan = new Scanner( System.in );
        char[] charaArray = scan.nextLine().toCharArray();
        scan.close();
        
        for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        }
        System.out.println();
        
        
        
    }
} import java.util.*; util.* java public class Main {
    public static void main( String args[] ) {
        Scanner scan = new Scanner( System.in );
        char[] charaArray = scan.nextLine().toCharArray();
        scan.close();
        
        for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        }
        System.out.println();
        
        
        
    }
} Main public static void main( String args[] ) {
        Scanner scan = new Scanner( System.in );
        char[] charaArray = scan.nextLine().toCharArray();
        scan.close();
        
        for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        }
        System.out.println();
        
        
        
    } main {
        Scanner scan = new Scanner( System.in );
        char[] charaArray = scan.nextLine().toCharArray();
        scan.close();
        
        for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        }
        System.out.println();
        
        
        
    } Scanner scan = new Scanner( System.in ); scan new Scanner( System.in ) char[] charaArray = scan.nextLine().toCharArray(); charaArray scan.nextLine().toCharArray() scan.nextLine().toCharArray scan.nextLine() scan.nextLine scan scan.close() scan.close scan for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        } char chara charaArray {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        } {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        } char result; result if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            } Character.isUpperCase(chara) Character.isUpperCase Character chara {
                result = Character.toLowerCase(chara);
                
            } result = Character.toLowerCase(chara) result Character.toLowerCase(chara) Character.toLowerCase Character chara {
                result = Character.toUpperCase(chara);
                
            } result = Character.toUpperCase(chara) result Character.toUpperCase(chara) Character.toUpperCase Character chara System.out.print( String.valueOf( result ) ) System.out.print System.out System System.out String.valueOf( result ) String.valueOf String result System.out.println() System.out.println System.out System System.out String args[] args public class Main {
    public static void main( String args[] ) {
        Scanner scan = new Scanner( System.in );
        char[] charaArray = scan.nextLine().toCharArray();
        scan.close();
        
        for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        }
        System.out.println();
        
        
        
    }
} public class Main {
    public static void main( String args[] ) {
        Scanner scan = new Scanner( System.in );
        char[] charaArray = scan.nextLine().toCharArray();
        scan.close();
        
        for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        }
        System.out.println();
        
        
        
    }
} Main
import java.util.*;

public class Main {
    public static void main( String args[] ) {
        Scanner scan = new Scanner( System.in );
        char[] charaArray = scan.nextLine().toCharArray();
        scan.close();
        
        for( char chara: charaArray ) {
            char result;
            if( Character.isUpperCase(chara) ) {
                result = Character.toLowerCase(chara);
                
            } else {
                result = Character.toUpperCase(chara);
                
            }
            System.out.print( String.valueOf( result ) );
            
        }
        System.out.println();
        
        
        
    }
}