import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        int i,j;
        
        Scanner sc=new Scanner(System.in);
        
        String str;
        Character c;
        str=sc.nextLine();
        for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        }
        System.out.printf("\n");
    }
}
 import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        int i,j;
        
        Scanner sc=new Scanner(System.in);
        
        String str;
        Character c;
        str=sc.nextLine();
        for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        }
        System.out.printf("\n");
    }
} Main public static void main(String[] args) throws Exception {
        int i,j;
        
        Scanner sc=new Scanner(System.in);
        
        String str;
        Character c;
        str=sc.nextLine();
        for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        }
        System.out.printf("\n");
    } main {
        int i,j;
        
        Scanner sc=new Scanner(System.in);
        
        String str;
        Character c;
        str=sc.nextLine();
        for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        }
        System.out.printf("\n");
    } int i i j; j Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String str; str Character c; c str=sc.nextLine() str sc.nextLine() sc.nextLine sc for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        } i=0; i=0 i 0 i<str.length() i str.length() str.length str i++ i++ i {
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        } {
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        } c=str.charAt(i) c str.charAt(i) str.charAt str i if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c); Character.isUpperCase(c) Character.isUpperCase Character c System.out.printf("%c",Character.toLowerCase(c)) System.out.printf System.out System System.out "%c" Character.toLowerCase(c) Character.toLowerCase Character c if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c); Character.isLowerCase(c) Character.isLowerCase Character c System.out.printf("%c",Character.toUpperCase(c)) System.out.printf System.out System System.out "%c" Character.toUpperCase(c) Character.toUpperCase Character c System.out.printf("%c",c) System.out.printf System.out System System.out "%c" c System.out.printf("\n") System.out.printf System.out System System.out "\n" String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        int i,j;
        
        Scanner sc=new Scanner(System.in);
        
        String str;
        Character c;
        str=sc.nextLine();
        for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        }
        System.out.printf("\n");
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        int i,j;
        
        Scanner sc=new Scanner(System.in);
        
        String str;
        Character c;
        str=sc.nextLine();
        for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        }
        System.out.printf("\n");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) throws Exception {
        int i,j;
        
        Scanner sc=new Scanner(System.in);
        
        String str;
        Character c;
        str=sc.nextLine();
        for(i=0;i<str.length();i++){
            c=str.charAt(i);
            if(Character.isUpperCase(c))System.out.printf("%c",Character.toLowerCase(c));
            else if(Character.isLowerCase(c))System.out.printf("%c",Character.toUpperCase(c));
            else System.out.printf("%c",c);
        }
        System.out.printf("\n");
    }
}

