import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char c[] = br.readLine().toCharArray();
        for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char c[] = br.readLine().toCharArray();
        for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char c[] = br.readLine().toCharArray();
        for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char c[] = br.readLine().toCharArray();
        for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char c[] = br.readLine().toCharArray(); c br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        } int i=0; int 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{
                c[i] = Character.toUpperCase(c[i]);
            }
        } {
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        } if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                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 {
                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 String[] args args public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char c[] = br.readLine().toCharArray();
        for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);
    }
} public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char c[] = br.readLine().toCharArray();
        for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        char c[] = br.readLine().toCharArray();
        for(int i=0;i<c.length;i++){
            if(Character.isUpperCase(c[i])){
                c[i] = Character.toLowerCase(c[i]);
            }else{
                c[i] = Character.toUpperCase(c[i]);
            }
        }
        System.out.println(c);
    }
}