import java.util.Scanner;
import java.io.*;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        

        String str;
        str = scan.nextLine();
        char[] charA;
        charA = str.toCharArray();   //char????????????
        
        
        for (int count = 0; count < charA.length; count++){
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        }
        System.out.println(charA);
    }
}      import java.util.Scanner; Scanner java.util import java.io.*; io.* java class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        

        String str;
        str = scan.nextLine();
        char[] charA;
        charA = str.toCharArray();   //char????????????
        
        
        for (int count = 0; count < charA.length; count++){
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        }
        System.out.println(charA);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        

        String str;
        str = scan.nextLine();
        char[] charA;
        charA = str.toCharArray();   //char????????????
        
        
        for (int count = 0; count < charA.length; count++){
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        }
        System.out.println(charA);
    } main {
        Scanner scan = new Scanner(System.in);
        

        String str;
        str = scan.nextLine();
        char[] charA;
        charA = str.toCharArray();   //char????????????
        
        
        for (int count = 0; count < charA.length; count++){
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        }
        System.out.println(charA);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str; str str = scan.nextLine() str scan.nextLine() scan.nextLine scan char[] charA; charA charA = str.toCharArray() charA str.toCharArray() str.toCharArray str for (int count = 0; count < charA.length; count++){
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        } int count = 0; int count = 0; count 0 count < charA.length count charA.length charA charA.length count++ count++ count {
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        } {
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        } if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            } Character.isUpperCase(charA[count]) Character.isUpperCase Character charA[count] charA count {
        		charA[count] = Character.toLowerCase(charA[count]);
        	} charA[count] = Character.toLowerCase(charA[count]) charA[count] charA count Character.toLowerCase(charA[count]) Character.toLowerCase Character charA[count] charA count if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            } Character.isLowerCase(charA[count]) Character.isLowerCase Character charA[count] charA count {
        		charA[count] = Character.toUpperCase(charA[count]);
            } charA[count] = Character.toUpperCase(charA[count]) charA[count] charA count Character.toUpperCase(charA[count]) Character.toUpperCase Character charA[count] charA count System.out.println(charA) System.out.println System.out System System.out charA String[] args args
import java.util.Scanner;
import java.io.*;

class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        

        String str;
        str = scan.nextLine();
        char[] charA;
        charA = str.toCharArray();   //char????????????
        
        
        for (int count = 0; count < charA.length; count++){
        	if( Character.isUpperCase(charA[count])){
        		charA[count] = Character.toLowerCase(charA[count]);
        	}
        	else if(Character.isLowerCase(charA[count])){
        		charA[count] = Character.toUpperCase(charA[count]);
            }
        }
        System.out.println(charA);
    }
}     