import java.util.Scanner;
import java.util.Formatter;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Formatter fm = new Formatter();
        String str1 = sc.nextLine();
        String str2 = "";
        for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        }
        System.out.println(fm);
    }
} import java.util.Scanner; Scanner java.util import java.util.Formatter; Formatter java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Formatter fm = new Formatter();
        String str1 = sc.nextLine();
        String str2 = "";
        for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        }
        System.out.println(fm);
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Formatter fm = new Formatter();
        String str1 = sc.nextLine();
        String str2 = "";
        for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        }
        System.out.println(fm);
    } main {
        Scanner sc = new Scanner(System.in);
        Formatter fm = new Formatter();
        String str1 = sc.nextLine();
        String str2 = "";
        for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        }
        System.out.println(fm);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) Formatter fm = new Formatter(); fm new Formatter() String str1 = sc.nextLine(); str1 sc.nextLine() sc.nextLine sc String str2 = ""; str2 "" for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        } int i=0; int i=0; i 0 i<str1.length() i str1.length() str1.length str1 i++ i++ i {
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        } {
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        } char c = str1.charAt(i); c str1.charAt(i) str1.charAt str1 i char d; d if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            } Character.isLowerCase(c) Character.isLowerCase Character c {
                d = Character.toUpperCase(c);
            } d = Character.toUpperCase(c) d Character.toUpperCase(c) Character.toUpperCase Character c {
                d = Character.toLowerCase(c);
            } d = Character.toLowerCase(c) d Character.toLowerCase(c) Character.toLowerCase Character c fm.format(str2 + "%c", d) fm.format fm str2 + "%c" str2 "%c" d System.out.println(fm) System.out.println System.out System System.out fm String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Formatter fm = new Formatter();
        String str1 = sc.nextLine();
        String str2 = "";
        for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        }
        System.out.println(fm);
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Formatter fm = new Formatter();
        String str1 = sc.nextLine();
        String str2 = "";
        for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        }
        System.out.println(fm);
    }
} Main
import java.util.Scanner;
import java.util.Formatter;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        Formatter fm = new Formatter();
        String str1 = sc.nextLine();
        String str2 = "";
        for(int i=0;i<str1.length();i++){
            char c = str1.charAt(i);
            char d;
            if(Character.isLowerCase(c)){
                d = Character.toUpperCase(c);
            }else{
                d = Character.toLowerCase(c);
            }
            fm.format(str2 + "%c", d);
        }
        System.out.println(fm);
    }
}
