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