import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new java.util.Scanner(System.in);
        String str = scan.nextLine();
        for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scan = new java.util.Scanner(System.in);
        String str = scan.nextLine();
        for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println();
    }
} Main public static void main(String[] args) {
        Scanner scan = new java.util.Scanner(System.in);
        String str = scan.nextLine();
        for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println();
    } main {
        Scanner scan = new java.util.Scanner(System.in);
        String str = scan.nextLine();
        for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println();
    } Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        } {
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        } if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            } Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
                System.out.print(Character.toLowerCase(str.charAt(i)));
            } System.out.print(Character.toLowerCase(str.charAt(i))) System.out.print System.out System System.out Character.toLowerCase(str.charAt(i)) Character.toLowerCase Character str.charAt(i) str.charAt str i {
                System.out.print(Character.toUpperCase(str.charAt(i)));
            } System.out.print(Character.toUpperCase(str.charAt(i))) System.out.print System.out System System.out Character.toUpperCase(str.charAt(i)) Character.toUpperCase Character str.charAt(i) str.charAt str 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 scan = new java.util.Scanner(System.in);
        String str = scan.nextLine();
        for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scan = new java.util.Scanner(System.in);
        String str = scan.nextLine();
        for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println();
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner scan = new java.util.Scanner(System.in);
        String str = scan.nextLine();
        for(int i = 0; i < str.length(); i++){
            if(Character.isUpperCase(str.charAt(i))){
                System.out.print(Character.toLowerCase(str.charAt(i)));
            }else{
                System.out.print(Character.toUpperCase(str.charAt(i)));
            }
        }
        System.out.println();
    }
}