import java.util.Scanner;

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

        String input = stdIn.nextLine();

        for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        }
        System.out.println();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String input = stdIn.nextLine();

        for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        }
        System.out.println();
    }
} Main public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String input = stdIn.nextLine();

        for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        }
        System.out.println();
    } main {
        Scanner stdIn = new Scanner(System.in);

        String input = stdIn.nextLine();

        for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        }
        System.out.println();
    } Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) String input = stdIn.nextLine(); input stdIn.nextLine() stdIn.nextLine stdIn for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        } char c input.toCharArray() input.toCharArray input {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        } {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        } if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            } 'A' <= c && c <= 'Z' 'A' <= c 'A' c 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' if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            } 'a' <= c && c <= 'z' 'a' <= c 'a' c 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(c);
            } System.out.print(c) System.out.print System.out System System.out c System.out.println() System.out.println System.out System System.out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String input = stdIn.nextLine();

        for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        }
        System.out.println();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner stdIn = new Scanner(System.in);

        String input = stdIn.nextLine();

        for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        }
        System.out.println();
    }
} Main
import java.util.Scanner;

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

        String input = stdIn.nextLine();

        for(char c : input.toCharArray()) {
            if('A' <= c && c <= 'Z') {
                System.out.print((char)(c + 'a' - 'A'));
            } else if('a' <= c && c <= 'z') {
                System.out.print((char)(c + 'A' - 'a'));
            } else {
                System.out.print(c);
            }
        }
        System.out.println();
    }
}