import java.util.*;
import java.lang.*;

/**
 * TogglingCases
 */
public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        }
        System.out.println();
    }
} import java.util.*; util.* java import java.lang.*; lang.* java public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        }
        System.out.println();
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        }
        System.out.println();
    } main {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        }
        System.out.println();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        } sc.hasNext() sc.hasNext sc {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        } String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char list[] = str.toCharArray(); list str.toCharArray() str.toCharArray str for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            } char ch list {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            } {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            } if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                } ch >= 'a' && ch <= 'z' ch >= 'a' ch 'a' ch <= 'z' ch 'z' {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } String newstr = new String(Character.toChars(ch + 'A' - 'a')); newstr new String(Character.toChars(ch + 'A' - 'a')) System.out.print(newstr) System.out.print System.out System System.out newstr if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                } ch >= 'A' && ch <= 'Z' ch >= 'A' ch 'A' ch <= 'Z' ch 'Z' {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } String newstr = new String(Character.toChars(ch + 'a' - 'A')); newstr new String(Character.toChars(ch + 'a' - 'A')) System.out.print(newstr) System.out.print System.out System System.out newstr {
                    System.out.print(ch);
                } System.out.print(ch) System.out.print System.out System System.out ch System.out.println() System.out.println System.out System System.out String[] args args public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        }
        System.out.println();
    }
} public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        }
        System.out.println();
    }
} Main
import java.util.*;
import java.lang.*;

/**
 * TogglingCases
 */
public class Main{

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

        while (sc.hasNext()) {
            String str = sc.nextLine();
            char list[] = str.toCharArray();
            for (char ch : list) {
                if (ch >= 'a' && ch <= 'z') {
                    String newstr = new String(Character.toChars(ch + 'A' - 'a'));
                    System.out.print(newstr);
                } else if (ch >= 'A' && ch <= 'Z') {
                    String newstr = new String(Character.toChars(ch + 'a' - 'A'));
                    System.out.print(newstr);
                } else {
                    System.out.print(ch);
                }
            }
        }
        System.out.println();
    }
}
