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

public class Main {

    public static void main(String[] args) {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        }
        System.out.println("");
    }
} 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) {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        }
        System.out.println("");
    }
} Main public static void main(String[] args) {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        }
        System.out.println("");
    } main {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        }
        System.out.println("");
    } try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        } catch (IOException e) {
            
        } IOException e {
            
        } {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) StringBuilder builder; builder String line = reader.readLine(); line reader.readLine() reader.readLine reader builder = new StringBuilder(line) builder new StringBuilder(line) for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            } int i = 0; int i = 0; i 0 i < line.length() i line.length() line.length line i++ i++ i {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            } {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            } char word = builder.charAt(i); word builder.charAt(i) builder.charAt builder i if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                } Character.isLowerCase(word) == true Character.isLowerCase(word) Character.isLowerCase Character word true {
                    System.out.print(Character.toUpperCase(word));
                } System.out.print(Character.toUpperCase(word)) System.out.print System.out System System.out Character.toUpperCase(word) Character.toUpperCase Character word if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                } Character.isUpperCase(word) == true Character.isUpperCase(word) Character.isUpperCase Character word true {
                    System.out.print(Character.toLowerCase(word));
                } System.out.print(Character.toLowerCase(word)) System.out.print System.out System System.out Character.toLowerCase(word) Character.toLowerCase Character word {
                    System.out.print(word);
                } System.out.print(word) System.out.print System.out System System.out word System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

    public static void main(String[] args) {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        }
        System.out.println("");
    }
} public class Main {

    public static void main(String[] args) {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        }
        System.out.println("");
    }
} Main

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

public class Main {

    public static void main(String[] args) {

        try {
            BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
            StringBuilder builder;
            String line = reader.readLine();
            builder = new StringBuilder(line);
            for (int i = 0; i < line.length(); i++) {
                char word = builder.charAt(i);
                if (Character.isLowerCase(word) == true) {
                    System.out.print(Character.toUpperCase(word));
                } else if (Character.isUpperCase(word) == true) {
                    System.out.print(Character.toLowerCase(word));
                } else {
                    System.out.print(word);
                }
            }
        } catch (IOException e) {
            
        }
        System.out.println("");
    }
}