import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.IOException;

public class Main {

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String input;
        while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        }
        bw.flush();
    }

} import java.io.BufferedReader; BufferedReader java.io import java.io.BufferedWriter; BufferedWriter java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.OutputStreamWriter; OutputStreamWriter java.io import java.io.IOException; IOException java.io public class Main {

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String input;
        while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        }
        bw.flush();
    }

} Main public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String input;
        while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        }
        bw.flush();
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String input;
        while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        }
        bw.flush();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out)); bw new BufferedWriter(new OutputStreamWriter(System.out)) String input; input while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        } (input = br.readLine()) != null (input = br.readLine()) input br.readLine() br.readLine br null {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        } for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            } char c input.toCharArray() input.toCharArray input {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            } {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            } if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                } c >= 'A' && c <= 'Z' c >= 'A' c 'A' c <= 'Z' c 'Z' {
                    bw.append((char) (c + 32));
                } bw.append((char) (c + 32)) bw.append bw (char) (c + 32) c 32 if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                } c >= 'a' && c <= 'z' c >= 'a' c 'a' c <= 'z' c 'z' {
                    bw.append((char) (c - 32));
                } bw.append((char) (c - 32)) bw.append bw (char) (c - 32) c 32 {
                    bw.append(c);
                } bw.append(c) bw.append bw c bw.newLine() bw.newLine bw bw.flush() bw.flush bw String args[] args public class Main {

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String input;
        while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        }
        bw.flush();
    }

} public class Main {

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String input;
        while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        }
        bw.flush();
    }

} Main
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.IOException;

public class Main {

    public static void main(String args[]) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
        String input;
        while ((input = br.readLine()) != null) {
            for (char c : input.toCharArray()) {
                if (c >= 'A' && c <= 'Z') {
                    bw.append((char) (c + 32));
                } else if (c >= 'a' && c <= 'z') {
                    bw.append((char) (c - 32));
                } else {
                    bw.append(c);
                }
            }
            bw.newLine();
        }
        bw.flush();
    }

}
