import java.util.Scanner;

/**
 * Toggling Cases
 */
public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        char[] charArray = scan.nextLine().toCharArray();
        scan.close();
        StringBuffer sb = new StringBuffer();
        for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        }
        System.out.println(sb);
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        char[] charArray = scan.nextLine().toCharArray();
        scan.close();
        StringBuffer sb = new StringBuffer();
        for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        }
        System.out.println(sb);
    }
} Main public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        char[] charArray = scan.nextLine().toCharArray();
        scan.close();
        StringBuffer sb = new StringBuffer();
        for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        }
        System.out.println(sb);
    } main {
        Scanner scan = new Scanner(System.in);

        char[] charArray = scan.nextLine().toCharArray();
        scan.close();
        StringBuffer sb = new StringBuffer();
        for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        }
        System.out.println(sb);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) char[] charArray = scan.nextLine().toCharArray(); charArray scan.nextLine().toCharArray() scan.nextLine().toCharArray scan.nextLine() scan.nextLine scan scan.close() scan.close scan StringBuffer sb = new StringBuffer(); sb new StringBuffer() for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        } char chara charArray {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        } {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        } if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            } Character.isUpperCase(chara) Character.isUpperCase Character chara {
                sb.append(String.valueOf(chara).toLowerCase());
            } sb.append(String.valueOf(chara).toLowerCase()) sb.append sb String.valueOf(chara).toLowerCase() String.valueOf(chara).toLowerCase String.valueOf(chara) String.valueOf String chara {
                sb.append(String.valueOf(chara).toUpperCase());
            } sb.append(String.valueOf(chara).toUpperCase()) sb.append sb String.valueOf(chara).toUpperCase() String.valueOf(chara).toUpperCase String.valueOf(chara) String.valueOf String chara System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        char[] charArray = scan.nextLine().toCharArray();
        scan.close();
        StringBuffer sb = new StringBuffer();
        for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        }
        System.out.println(sb);
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        char[] charArray = scan.nextLine().toCharArray();
        scan.close();
        StringBuffer sb = new StringBuffer();
        for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        }
        System.out.println(sb);
    }
} Main
import java.util.Scanner;

/**
 * Toggling Cases
 */
public class Main {

    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        char[] charArray = scan.nextLine().toCharArray();
        scan.close();
        StringBuffer sb = new StringBuffer();
        for (char chara: charArray) {
            if (Character.isUpperCase(chara)) {
                sb.append(String.valueOf(chara).toLowerCase());
            } else {
                sb.append(String.valueOf(chara).toUpperCase());
            }
        }
        System.out.println(sb);
    }
}