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