import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String sout = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        }
        System.out.println(sout);
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String sout = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        }
        System.out.println(sout);
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String sout = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        }
        System.out.println(sout);
    } main {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String sout = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        }
        System.out.println(sout);
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String s = scanner.nextLine(); s scanner.nextLine() scanner.nextLine scanner String sout = ""; sout "" for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        } {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        } char c = s.charAt(i); c s.charAt(i) s.charAt s i if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            } 'a' <= c && c <= 'z' 'a' <= c 'a' c c <= 'z' c 'z' {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } c = (char)(c - 'a' + 'A') c (char)(c - 'a' + 'A') c - 'a' c 'a' 'A' if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            } 'A' <= c && c <= 'Z' 'A' <= c 'A' c c <= 'Z' c 'Z' {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } c = (char)(c - 'A' + 'a') c (char)(c - 'A' + 'a') c - 'A' c 'A' 'a' {
                // nop
            } sout = sout + c sout sout + c sout c System.out.println(sout) System.out.println System.out System System.out sout String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String sout = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        }
        System.out.println(sout);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String sout = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        }
        System.out.println(sout);
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String s = scanner.nextLine();
        String sout = "";
        for (int i = 0; i < s.length(); i++) {
            char c = s.charAt(i);
            if ('a' <= c && c <= 'z') {
//                c = Character.toUpperCase(c);
                c = (char)(c - 'a' + 'A');
            } else if ('A' <= c && c <= 'Z') {
//                c = Character.toLowerCase(c);
                c = (char)(c - 'A' + 'a');
            } else {
                // nop
            }
            sout = sout + c;
        }
        System.out.println(sout);
    }
}
