import java.util.Scanner;

public class Main {

    public static void main(String[] args)throws Exception {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] ch = line.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        }
        for (char c : ch) {
            System.out.print(c);
        }
        System.out.println();
        sc.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args)throws Exception {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] ch = line.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        }
        for (char c : ch) {
            System.out.print(c);
        }
        System.out.println();
        sc.close();
    }
} Main public static void main(String[] args)throws Exception {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] ch = line.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        }
        for (char c : ch) {
            System.out.print(c);
        }
        System.out.println();
        sc.close();
    } main {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] ch = line.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        }
        for (char c : ch) {
            System.out.print(c);
        }
        System.out.println();
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc char[] ch = line.toCharArray(); ch line.toCharArray() line.toCharArray line for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        } int i = 0; int i = 0; i 0 i < ch.length i ch.length ch ch.length i++ i++ i {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        } {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        } if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            } Character.isUpperCase(ch[i]) Character.isUpperCase Character ch[i] ch i {
                ch[i] = Character.toLowerCase(ch[i]);
            } ch[i] = Character.toLowerCase(ch[i]) ch[i] ch i Character.toLowerCase(ch[i]) Character.toLowerCase Character ch[i] ch i if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            } Character.isLowerCase(ch[i]) Character.isLowerCase Character ch[i] ch i {
                ch[i] = Character.toUpperCase(ch[i]);
            } ch[i] = Character.toUpperCase(ch[i]) ch[i] ch i Character.toUpperCase(ch[i]) Character.toUpperCase Character ch[i] ch i for (char c : ch) {
            System.out.print(c);
        } char c ch {
            System.out.print(c);
        } {
            System.out.print(c);
        } System.out.print(c) System.out.print System.out System System.out c System.out.println() System.out.println System.out System System.out sc.close() sc.close sc String[] args args public class Main {

    public static void main(String[] args)throws Exception {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] ch = line.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        }
        for (char c : ch) {
            System.out.print(c);
        }
        System.out.println();
        sc.close();
    }
} public class Main {

    public static void main(String[] args)throws Exception {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] ch = line.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        }
        for (char c : ch) {
            System.out.print(c);
        }
        System.out.println();
        sc.close();
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args)throws Exception {

        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        char[] ch = line.toCharArray();
        for (int i = 0; i < ch.length; i++) {
            if(Character.isUpperCase(ch[i])){
                ch[i] = Character.toLowerCase(ch[i]);
            }else if(Character.isLowerCase(ch[i])){
                ch[i] = Character.toUpperCase(ch[i]);
            }
        }
        for (char c : ch) {
            System.out.print(c);
        }
        System.out.println();
        sc.close();
    }
}