import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        char[] ary = scn.nextLine().toCharArray();
        StringBuilder sb = new StringBuilder();
        for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        }
        System.out.println(sb);
    }
} import java.util.*; util.* java public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        char[] ary = scn.nextLine().toCharArray();
        StringBuilder sb = new StringBuilder();
        for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        }
        System.out.println(sb);
    }
} Main private static final Scanner scn = new Scanner(System.in); scn new Scanner(System.in) public static void main(String[] args) {
        char[] ary = scn.nextLine().toCharArray();
        StringBuilder sb = new StringBuilder();
        for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        }
        System.out.println(sb);
    } main {
        char[] ary = scn.nextLine().toCharArray();
        StringBuilder sb = new StringBuilder();
        for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        }
        System.out.println(sb);
    } char[] ary = scn.nextLine().toCharArray(); ary scn.nextLine().toCharArray() scn.nextLine().toCharArray scn.nextLine() scn.nextLine scn StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        } char elm ary {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        } {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        } if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            } Character.isLowerCase(elm) Character.isLowerCase Character elm {
                 sb.append(Character.toUpperCase(elm));
            } sb.append(Character.toUpperCase(elm)) sb.append sb Character.toUpperCase(elm) Character.toUpperCase Character elm {
                 sb.append(Character.toLowerCase(elm));
            } sb.append(Character.toLowerCase(elm)) sb.append sb Character.toLowerCase(elm) Character.toLowerCase Character elm System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        char[] ary = scn.nextLine().toCharArray();
        StringBuilder sb = new StringBuilder();
        for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        }
        System.out.println(sb);
    }
} public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        char[] ary = scn.nextLine().toCharArray();
        StringBuilder sb = new StringBuilder();
        for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        }
        System.out.println(sb);
    }
} Main
import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        char[] ary = scn.nextLine().toCharArray();
        StringBuilder sb = new StringBuilder();
        for(char elm : ary) {
            if(Character.isLowerCase(elm)) {
                 sb.append(Character.toUpperCase(elm));
            } else {
                 sb.append(Character.toLowerCase(elm));
            }
        }
        System.out.println(sb);
    }
}