import java.io.*;
import java.util.Arrays;
class Main{
    public static void main(String[] args) throws IOException {
        int i;
        int[] n = new int[990];
        String str;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        str = in.readLine();
        char[] c = str.toCharArray();
        for(i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);   
        System.out.flush();
    }
} import java.io.*; io.* java import java.util.Arrays; Arrays java.util class Main{
    public static void main(String[] args) throws IOException {
        int i;
        int[] n = new int[990];
        String str;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        str = in.readLine();
        char[] c = str.toCharArray();
        for(i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);   
        System.out.flush();
    }
} Main public static void main(String[] args) throws IOException {
        int i;
        int[] n = new int[990];
        String str;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        str = in.readLine();
        char[] c = str.toCharArray();
        for(i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);   
        System.out.flush();
    } main {
        int i;
        int[] n = new int[990];
        String str;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        str = in.readLine();
        char[] c = str.toCharArray();
        for(i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);   
        System.out.flush();
    } int i; i int[] n = new int[990]; n new int[990] 990 String str; str BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) str = in.readLine() str in.readLine() in.readLine in char[] c = str.toCharArray(); c str.toCharArray() str.toCharArray str for(i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        } i=0; i=0 i 0 i<c.length i c.length c c.length i++ i++ i {
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        } {
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        } if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            } Character.isUpperCase(c[i]) Character.isUpperCase Character c[i] c i {
                c[i] = Character.toLowerCase(c[i]);
            } c[i] = Character.toLowerCase(c[i]) c[i] c i Character.toLowerCase(c[i]) Character.toLowerCase Character c[i] c i if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            } Character.isLowerCase(c[i]) Character.isLowerCase Character c[i] c i {
                c[i] = Character.toUpperCase(c[i]);
            } c[i] = Character.toUpperCase(c[i]) c[i] c i Character.toUpperCase(c[i]) Character.toUpperCase Character c[i] c i System.out.println(c) System.out.println System.out System System.out c System.out.flush() System.out.flush System.out System System.out String[] args args
import java.io.*;
import java.util.Arrays;
class Main{
    public static void main(String[] args) throws IOException {
        int i;
        int[] n = new int[990];
        String str;
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        str = in.readLine();
        char[] c = str.toCharArray();
        for(i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }
            else if(Character.isLowerCase(c[i])){
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);   
        System.out.flush();
    }
}