import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        }
        System.out.println(sb.substring(0, sb.length()-1));
    }
}
 import java.util.*; util.* java public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        }
        System.out.println(sb.substring(0, sb.length()-1));
    }
} Main private static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        }
        System.out.println(sb.substring(0, sb.length()-1));
    } main {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        }
        System.out.println(sb.substring(0, sb.length()-1));
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        } sc.hasNext() sc.hasNext sc {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        } String s = sc.next(); s sc.next() sc.next sc int l = s.length(); l s.length() s.length s for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            } int i = 0; int i = 0; i 0 i < l i l i++ i++ i {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            } {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            } char c = s.charAt(i); c s.charAt(i) s.charAt s i if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                } 'a' <= c && c <= 'z' 'a' <= c 'a' c c <= 'z' c 'z' {
                    c -= 32;
                } c -= 32 c 32 if ('A' <= c && c <= 'Z') {
                    c += 32;
                } 'A' <= c && c <= 'Z' 'A' <= c 'A' c c <= 'Z' c 'Z' {
                    c += 32;
                } c += 32 c 32 sb.append(c) sb.append sb c sb.append(' ') sb.append sb ' ' System.out.println(sb.substring(0, sb.length()-1)) System.out.println System.out System System.out sb.substring(0, sb.length()-1) sb.substring sb 0 sb.length()-1 sb.length() sb.length sb 1 String[] args args public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        }
        System.out.println(sb.substring(0, sb.length()-1));
    }
} public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        }
        System.out.println(sb.substring(0, sb.length()-1));
    }
} Main
import java.util.*;

public class Main {
    private static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            int l = s.length();
            for (int i = 0;i < l;i++) {
                char c = s.charAt(i);
                if ('a' <= c && c <= 'z') {
                    c -= 32;
                } else if ('A' <= c && c <= 'Z') {
                    c += 32;
                }
                sb.append(c);
            }
            sb.append(' ');
        }
        System.out.println(sb.substring(0, sb.length()-1));
    }
}

