import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scn = new Scanner(System.in);
        String str = scn.nextLine();
        String changed = "";

        for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        }
        System.out.println(changed);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {

        Scanner scn = new Scanner(System.in);
        String str = scn.nextLine();
        String changed = "";

        for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        }
        System.out.println(changed);
    }
} Main public static void main(String[] args) {

        Scanner scn = new Scanner(System.in);
        String str = scn.nextLine();
        String changed = "";

        for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        }
        System.out.println(changed);
    } main {

        Scanner scn = new Scanner(System.in);
        String str = scn.nextLine();
        String changed = "";

        for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        }
        System.out.println(changed);
    } Scanner scn = new Scanner(System.in); scn new Scanner(System.in) String str = scn.nextLine(); str scn.nextLine() scn.nextLine scn String changed = ""; changed "" for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += 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))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        } {

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        } if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            } Character.isUpperCase( str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
                changed += Character.toLowerCase(str.charAt(i));
            } changed += Character.toLowerCase(str.charAt(i)) changed Character.toLowerCase(str.charAt(i)) Character.toLowerCase Character str.charAt(i) str.charAt str i if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            } Character.isLowerCase( str.charAt(i)) Character.isLowerCase Character str.charAt(i) str.charAt str i {
                changed += Character.toUpperCase(str.charAt(i));
            } changed += Character.toUpperCase(str.charAt(i)) changed Character.toUpperCase(str.charAt(i)) Character.toUpperCase Character str.charAt(i) str.charAt str i {
                changed += str.charAt(i);
            } changed += str.charAt(i) changed str.charAt(i) str.charAt str i System.out.println(changed) System.out.println System.out System System.out changed String[] args args public class Main {
    public static void main(String[] args) {

        Scanner scn = new Scanner(System.in);
        String str = scn.nextLine();
        String changed = "";

        for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        }
        System.out.println(changed);
    }
} public class Main {
    public static void main(String[] args) {

        Scanner scn = new Scanner(System.in);
        String str = scn.nextLine();
        String changed = "";

        for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        }
        System.out.println(changed);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {

        Scanner scn = new Scanner(System.in);
        String str = scn.nextLine();
        String changed = "";

        for(int i = 0; i < str.length(); i++){

            if(Character.isUpperCase( str.charAt(i))){
                changed += Character.toLowerCase(str.charAt(i));
            }
            else if(Character.isLowerCase( str.charAt(i))){
                changed += Character.toUpperCase(str.charAt(i));
            }
            else{
                changed += str.charAt(i);
            }
        }
        System.out.println(changed);
    }
}
