import java.util.Scanner;

public class Main{
    public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String line  = sc.nextLine();
        
        for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        }
        
        System.out.println();
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String line  = sc.nextLine();
        
        for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        }
        
        System.out.println();
    }
} Main public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String line  = sc.nextLine();
        
        for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        }
        
        System.out.println();
    } main {
    	Scanner sc = new Scanner(System.in);
        String line  = sc.nextLine();
        
        for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        }
        
        System.out.println();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line  = sc.nextLine(); line sc.nextLine() sc.nextLine sc for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        } int i = 0; int i = 0; i 0 i < line.length() i line.length() line.length line i++ i++ i {
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        } {
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        } if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            } Character.isLowerCase(line.charAt(i)) Character.isLowerCase Character line.charAt(i) line.charAt line i {
                System.out.print(Character.toUpperCase(line.charAt(i)));
            } System.out.print(Character.toUpperCase(line.charAt(i))) System.out.print System.out System System.out Character.toUpperCase(line.charAt(i)) Character.toUpperCase Character line.charAt(i) line.charAt line i if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            } Character.isUpperCase(line.charAt(i)) Character.isUpperCase Character line.charAt(i) line.charAt line i {
                System.out.print(Character.toLowerCase(line.charAt(i)));
            } System.out.print(Character.toLowerCase(line.charAt(i))) System.out.print System.out System System.out Character.toLowerCase(line.charAt(i)) Character.toLowerCase Character line.charAt(i) line.charAt line i {
                System.out.print(line.charAt(i));
            } System.out.print(line.charAt(i)) System.out.print System.out System System.out line.charAt(i) line.charAt line i System.out.println() System.out.println System.out System System.out String[] args args public class Main{
    public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String line  = sc.nextLine();
        
        for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        }
        
        System.out.println();
    }
} public class Main{
    public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String line  = sc.nextLine();
        
        for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        }
        
        System.out.println();
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
    	Scanner sc = new Scanner(System.in);
        String line  = sc.nextLine();
        
        for(int i = 0; i < line.length(); i++){
            if(Character.isLowerCase(line.charAt(i))){
                System.out.print(Character.toUpperCase(line.charAt(i)));
            }
            
            else if(Character.isUpperCase(line.charAt(i))){
                System.out.print(Character.toLowerCase(line.charAt(i)));
            }
            
            else {
                System.out.print(line.charAt(i));
            }
        }
        
        System.out.println();
    }
}
