import java.util.HashMap;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.regex.Pattern;
import java.util.Collections;

public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        }
        
        sb.delete(sb.length()-1, sb.length());
        System.out.println(sb);
    }
} import java.util.HashMap; HashMap java.util import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util import java.util.regex.Pattern; Pattern java.util.regex import java.util.Collections; Collections java.util public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        }
        
        sb.delete(sb.length()-1, sb.length());
        System.out.println(sb);
    }
} Main public static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) throws Exception {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        }
        
        sb.delete(sb.length()-1, sb.length());
        System.out.println(sb);
    } main {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        }
        
        sb.delete(sb.length()-1, sb.length());
        System.out.println(sb);
    } StringBuilder sb = new StringBuilder(); sb new StringBuilder() while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        } sc.hasNext() sc.hasNext sc {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        } String s = sc.next(); s sc.next() sc.next sc for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            } {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            } Character c = s.charAt(i); c s.charAt(i) s.charAt s i if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                } Character.isLetter(c) Character.isLetter Character c {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                } if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    } Character.isUpperCase(c) Character.isUpperCase Character c {
                        c = Character.toLowerCase(c);
                    } c = Character.toLowerCase(c) c Character.toLowerCase(c) Character.toLowerCase Character c {
                        c = Character.toUpperCase(c);
                    } c = Character.toUpperCase(c) c Character.toUpperCase(c) Character.toUpperCase Character c sb.append(c) sb.append sb c sb.append(" ") sb.append sb " " sb.delete(sb.length()-1, sb.length()) sb.delete sb sb.length()-1 sb.length() sb.length sb 1 sb.length() sb.length sb System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        }
        
        sb.delete(sb.length()-1, sb.length());
        System.out.println(sb);
    }
} public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        }
        
        sb.delete(sb.length()-1, sb.length());
        System.out.println(sb);
    }
} Main
import java.util.HashMap;
import java.util.ArrayList;
import java.util.Scanner;
import java.util.regex.Pattern;
import java.util.Collections;

public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
        StringBuilder sb = new StringBuilder();
        while (sc.hasNext()) {
            String s = sc.next();
            
            for (int i = 0; i < s.length(); i++) {
                Character c = s.charAt(i);
                if (Character.isLetter(c)) {
                    if (Character.isUpperCase(c)) {
                        c = Character.toLowerCase(c);
                    } else {
                        c = Character.toUpperCase(c);
                    }
                }
                sb.append(c);
            }
            sb.append(" ");
        }
        
        sb.delete(sb.length()-1, sb.length());
        System.out.println(sb);
    }
}