import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        }
        System.out.print("\n");
    }
} import java.util.*; util.* java public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        }
        System.out.print("\n");
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        }
        System.out.print("\n");
    } main {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        }
        System.out.print("\n");
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.nextLine(); s sc.nextLine() sc.nextLine sc for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        } {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        } if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i)); 'a' <= s.charAt(i) && s.charAt(i) <= 'z' 'a' <= s.charAt(i) 'a' s.charAt(i) s.charAt s i s.charAt(i) <= 'z' s.charAt(i) s.charAt s i 'z' {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } System.out.print((char)(s.charAt(i) - 'a' + 'A')) System.out.print System.out System System.out (char)(s.charAt(i) - 'a' + 'A') s.charAt(i) - 'a' s.charAt(i) s.charAt s i 'a' 'A' if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i)); 'A' <= s.charAt(i) && s.charAt(i) <= 'Z' 'A' <= s.charAt(i) 'A' s.charAt(i) s.charAt s i s.charAt(i) <= 'Z' s.charAt(i) s.charAt s i 'Z' {
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            } System.out.print((char)(s.charAt(i) - 'A' + 'a')) System.out.print System.out System System.out (char)(s.charAt(i) - 'A' + 'a') s.charAt(i) - 'A' s.charAt(i) s.charAt s i 'A' 'a' System.out.print(s.charAt(i)) System.out.print System.out System System.out s.charAt(i) s.charAt s i System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        }
        System.out.print("\n");
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        }
        System.out.print("\n");
    }
} Main
import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String s = sc.nextLine();
        for (int i = 0; i < s.length(); i++) {
            if ('a' <= s.charAt(i) && s.charAt(i) <= 'z') {
                System.out.print((char)(s.charAt(i) - 'a' + 'A'));
            } else if ('A' <= s.charAt(i) && s.charAt(i) <= 'Z'){
                System.out.print((char)(s.charAt(i) - 'A' + 'a'));
            }
            else System.out.print(s.charAt(i));
        }
        System.out.print("\n");
    }
}
