import java.util.Scanner;

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

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