import java.util.Scanner;

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

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