import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        
        for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        }
        System.out.println();
    }
} import java.util.Scanner; Scanner java.util public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        
        for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        }
        System.out.println();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        
        for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        }
        System.out.println();
    } main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        
        for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        }
        System.out.println();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        } int i=0; int i=0; i 0 i<line.length() i line.length() line.length line i++ i++ i {
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        } {
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        } char ch = line.charAt(i); ch line.charAt(i) line.charAt line i if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            } Character.isLowerCase(ch) Character.isLowerCase Character ch {
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            } String s = String.valueOf(ch); s String.valueOf(ch) String.valueOf String ch s = s.toUpperCase() s s.toUpperCase() s.toUpperCase s System.out.printf("%s",s) System.out.printf System.out System System.out "%s" s if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            } Character.isUpperCase(ch) Character.isUpperCase Character ch {
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            } String s = String.valueOf(ch); s String.valueOf(ch) String.valueOf String ch s = s.toLowerCase() s s.toLowerCase() s.toLowerCase s System.out.printf("%s",s) System.out.printf System.out System System.out "%s" s {
                System.out.printf("%c",ch);
            } System.out.printf("%c",ch) System.out.printf System.out System System.out "%c" ch System.out.println() System.out.println System.out System System.out String[] args args public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        
        for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        }
        System.out.println();
    }
} public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        
        for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        }
        System.out.println();
    }
} Main
import java.util.Scanner;

public class Main{
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        
        for(int i=0;i<line.length();i++){
            char ch = line.charAt(i);
            if(Character.isLowerCase(ch)){
                String s = String.valueOf(ch);
                s = s.toUpperCase();
                System.out.printf("%s",s);
            }else if(Character.isUpperCase(ch)){
                String s = String.valueOf(ch);
                s = s.toLowerCase();
                System.out.printf("%s",s);
            }else{
                System.out.printf("%c",ch);
            }
        }
        System.out.println();
    }
}
