import java.io.*;

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

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