import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int length = line.length();
        String ans = "";
        char[] a;
        a = new char[length];
        for(int i=0; i<length; i++) {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        }
        System.out.println(ans);
    }
} 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();
        int length = line.length();
        String ans = "";
        char[] a;
        a = new char[length];
        for(int i=0; i<length; i++) {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        }
        System.out.println(ans);
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int length = line.length();
        String ans = "";
        char[] a;
        a = new char[length];
        for(int i=0; i<length; i++) {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        }
        System.out.println(ans);
    } main {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int length = line.length();
        String ans = "";
        char[] a;
        a = new char[length];
        for(int i=0; i<length; i++) {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        }
        System.out.println(ans);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc int length = line.length(); length line.length() line.length line String ans = ""; ans "" char[] a; a a = new char[length] a new char[length] length for(int i=0; i<length; i++) {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        } int i=0; int i=0; i 0 i<length i length i++ i++ i {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        } {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        } a[i] = line.charAt(i) a[i] a i line.charAt(i) line.charAt line i if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); Character.isLowerCase(a[i]) Character.isLowerCase Character a[i] a i ans += Character.toUpperCase(a[i]) ans Character.toUpperCase(a[i]) Character.toUpperCase Character a[i] a i ans += Character.toLowerCase(a[i]) ans Character.toLowerCase(a[i]) Character.toLowerCase Character a[i] a i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int length = line.length();
        String ans = "";
        char[] a;
        a = new char[length];
        for(int i=0; i<length; i++) {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        }
        System.out.println(ans);
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String line = sc.nextLine();
        int length = line.length();
        String ans = "";
        char[] a;
        a = new char[length];
        for(int i=0; i<length; i++) {
            a[i] = line.charAt(i);
            if(Character.isLowerCase(a[i])) ans += Character.toUpperCase(a[i]);
            else ans += Character.toLowerCase(a[i]); 
        }
        System.out.println(ans);
    }
} Main
import java.util.Scanner;

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