import java.util.*;

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

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

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

        }
        System.out.println(answer);
    } main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        int i;
        char c;
        
        for(i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                c = Character.toUpperCase(line.charAt(i));
                answer = answer + c;
            }else{
                c = Character.toLowerCase(line.charAt(i));
                answer = answer + c;
            }

        }
        System.out.println(answer);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String answer = ""; answer "" int length = line.length(); length line.length() line.length line int i; i char c; c for(i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                c = Character.toUpperCase(line.charAt(i));
                answer = answer + c;
            }else{
                c = Character.toLowerCase(line.charAt(i));
                answer = answer + c;
            }

        } i=0; i=0 i 0 i<line.length() i line.length() line.length line i++ i++ i {
            if(Character.isLowerCase(line.charAt(i))){
                c = Character.toUpperCase(line.charAt(i));
                answer = answer + c;
            }else{
                c = Character.toLowerCase(line.charAt(i));
                answer = answer + c;
            }

        } {
            if(Character.isLowerCase(line.charAt(i))){
                c = Character.toUpperCase(line.charAt(i));
                answer = answer + c;
            }else{
                c = Character.toLowerCase(line.charAt(i));
                answer = answer + c;
            }

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

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

        }
        System.out.println(answer);
    }
} Main
import java.util.*;

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

        }
        System.out.println(answer);
    }
}
