import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        StringBuilder build = new StringBuilder();
        String str = sc.nextLine();
        char[] cha = str.toCharArray();
        for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        }
        System.out.println(build.toString());
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        StringBuilder build = new StringBuilder();
        String str = sc.nextLine();
        char[] cha = str.toCharArray();
        for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        }
        System.out.println(build.toString());
    }
} Main public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        StringBuilder build = new StringBuilder();
        String str = sc.nextLine();
        char[] cha = str.toCharArray();
        for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        }
        System.out.println(build.toString());
    } main {
        Scanner sc = new Scanner(System.in);
        StringBuilder build = new StringBuilder();
        String str = sc.nextLine();
        char[] cha = str.toCharArray();
        for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        }
        System.out.println(build.toString());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) StringBuilder build = new StringBuilder(); build new StringBuilder() String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char[] cha = str.toCharArray(); cha str.toCharArray() str.toCharArray str for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        } int i = 0; int i = 0; i 0 i < cha.length i cha.length cha cha.length i++ i++ i if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        } if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        } Character.isLowerCase(cha[i]) Character.isLowerCase Character cha[i] cha i {
                build.append(Character.toUpperCase(cha[i]));
            } build.append(Character.toUpperCase(cha[i])) build.append build Character.toUpperCase(cha[i]) Character.toUpperCase Character cha[i] cha i if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        } Character.isUpperCase(cha[i]) Character.isUpperCase Character cha[i] cha i {
                build.append(Character.toLowerCase(cha[i]));
            } build.append(Character.toLowerCase(cha[i])) build.append build Character.toLowerCase(cha[i]) Character.toLowerCase Character cha[i] cha i {
                build.append(cha[i]);
        } build.append(cha[i]) build.append build cha[i] cha i System.out.println(build.toString()) System.out.println System.out System System.out build.toString() build.toString build String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        StringBuilder build = new StringBuilder();
        String str = sc.nextLine();
        char[] cha = str.toCharArray();
        for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        }
        System.out.println(build.toString());
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        StringBuilder build = new StringBuilder();
        String str = sc.nextLine();
        char[] cha = str.toCharArray();
        for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        }
        System.out.println(build.toString());
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) throws Exception {
        Scanner sc = new Scanner(System.in);
        StringBuilder build = new StringBuilder();
        String str = sc.nextLine();
        char[] cha = str.toCharArray();
        for(int i = 0; i < cha.length; i++)
            if(Character.isLowerCase(cha[i])){
                build.append(Character.toUpperCase(cha[i]));
            }else if(Character.isUpperCase(cha[i])){
                build.append(Character.toLowerCase(cha[i]));
            }else{
                build.append(cha[i]);
        }
        System.out.println(build.toString());
    }
}