import java.io.InputStreamReader;
import java.io.BufferedReader;
public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        }
        System.out.println();
    }
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        }
        System.out.println();
    }
} Main public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        }
        System.out.println();
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        }
        System.out.println();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        } int i = 0; int i = 0; i 0 i < line.length() i line.length() line.length line i++ i++ i {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        } {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        } char c = line.charAt(i); c line.charAt(i) line.charAt line i char out = c; out c if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            } c >= 'a' && c <= 'z' c >= 'a' c 'a' c <= 'z' c 'z' {
                out = (char) (c - ('a' - 'A'));
            } out = (char) (c - ('a' - 'A')) out (char) (c - ('a' - 'A')) c ('a' - 'A') 'a' 'A' if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            } c >= 'A' && c <= 'Z' c >= 'A' c 'A' c <= 'Z' c 'Z' {
                out = (char) (c + ('a' - 'A'));
            } out = (char) (c + ('a' - 'A')) out (char) (c + ('a' - 'A')) c ('a' - 'A') 'a' 'A' System.out.print(out) System.out.print System.out System System.out out System.out.println() System.out.println System.out System System.out String[] args args public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        }
        System.out.println();
    }
} public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        }
        System.out.println();
    }
} Main
import java.io.InputStreamReader;
import java.io.BufferedReader;
public class Main {

    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();

        for (int i = 0; i < line.length(); i++) {
            char c = line.charAt(i);
            char out = c;
            if (c >= 'a' && c <= 'z') {
                out = (char) (c - ('a' - 'A'));
            } else if (c >= 'A' && c <= 'Z') {
                out = (char) (c + ('a' - 'A'));
            }
            System.out.print(out);
        }
        System.out.println();
    }
}
