import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        String str;
        char c;
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            str = sc.next();
            for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            }
            if (sc.hasNext())
                System.out.print(" ");
        }
        System.out.println();
    }
} import java.util.Scanner; Scanner java.util class Main {
    public static void main(String[] args) {
        String str;
        char c;
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            str = sc.next();
            for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            }
            if (sc.hasNext())
                System.out.print(" ");
        }
        System.out.println();
    }
} Main public static void main(String[] args) {
        String str;
        char c;
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            str = sc.next();
            for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            }
            if (sc.hasNext())
                System.out.print(" ");
        }
        System.out.println();
    } main {
        String str;
        char c;
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            str = sc.next();
            for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            }
            if (sc.hasNext())
                System.out.print(" ");
        }
        System.out.println();
    } String str; str char c; c Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            str = sc.next();
            for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            }
            if (sc.hasNext())
                System.out.print(" ");
        } sc.hasNext() sc.hasNext sc {
            str = sc.next();
            for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            }
            if (sc.hasNext())
                System.out.print(" ");
        } str = sc.next() str sc.next() sc.next sc for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            } {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            } c = str.charAt(i) c str.charAt(i) str.charAt str i if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                } c >= 'A' && c <= 'z' c >= 'A' c 'A' c <= 'z' c 'z' {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    } c >= 'a' && c <= 'z' c >= 'a' c 'a' c <= 'z' c 'z' {
                        System.out.print((char)(c + 'A' - 'a'));
                    } System.out.print((char)(c + 'A' - 'a')) System.out.print System.out System System.out (char)(c + 'A' - 'a') c + 'A' c 'A' 'a' {
                        System.out.print((char)(c + 'a' - 'A'));
                    } System.out.print((char)(c + 'a' - 'A')) System.out.print System.out System System.out (char)(c + 'a' - 'A') c + 'a' c 'a' 'A' {
                    System.out.print(c);
                } System.out.print(c) System.out.print System.out System System.out c if (sc.hasNext())
                System.out.print(" "); sc.hasNext() sc.hasNext sc System.out.print(" ") System.out.print System.out System System.out " " System.out.println() System.out.println System.out System System.out String[] args args
import java.util.Scanner;

class Main {
    public static void main(String[] args) {
        String str;
        char c;
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            str = sc.next();
            for(int i = 0; i < str.length(); i++) {
                c = str.charAt(i);
                if (c >= 'A' && c <= 'z') {
                    if (c >= 'a' && c <= 'z') {
                        System.out.print((char)(c + 'A' - 'a'));
                    } else {
                        System.out.print((char)(c + 'a' - 'A'));
                    }
                } else {
                    System.out.print(c);
                }
            }
            if (sc.hasNext())
                System.out.print(" ");
        }
        System.out.println();
    }
}
