import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  }
} import java.io.*; io.* java import java.util.*; util.* java public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  }
} Main public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  } 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 String[] strs = new String[str.length()]; strs new String[str.length()] str.length() str.length str for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    } {
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    } strs[i] = String.valueOf(str.charAt(i)) strs[i] strs i String.valueOf(str.charAt(i)) String.valueOf String str.charAt(i) str.charAt str i if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        } strs[i].toUpperCase().equals(strs[i]) strs[i].toUpperCase().equals strs[i].toUpperCase() strs[i].toUpperCase strs[i] strs i strs[i] strs i {
                            strs[i] = strs[i].toLowerCase();
                        } strs[i] = strs[i].toLowerCase() strs[i] strs i strs[i].toLowerCase() strs[i].toLowerCase strs[i] strs i if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        } strs[i].toLowerCase().equals(strs[i]) strs[i].toLowerCase().equals strs[i].toLowerCase() strs[i].toLowerCase strs[i] strs i strs[i] strs i {
                            strs[i] = strs[i].toUpperCase();
                        } strs[i] = strs[i].toUpperCase() strs[i] strs i strs[i].toUpperCase() strs[i].toUpperCase strs[i] strs i StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    } int i=0; int i=0; i 0 i<strs.length i strs.length strs strs.length i++ i++ i {
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    } {
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    } sb.append(strs[i]) sb.append sb strs[i] strs i System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString 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();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  }
} public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  }
} Main
import java.io.*;
import java.util.*;

public class Main{
    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        String[] strs = new String[str.length()];                    
                    
                    for(int i=0;i<str.length();i++){
                        strs[i] = String.valueOf(str.charAt(i));
                        if(strs[i].toUpperCase().equals(strs[i])){
                            strs[i] = strs[i].toLowerCase();
                        }else if(strs[i].toLowerCase().equals(strs[i])){
                            strs[i] = strs[i].toUpperCase();
                        }
                    }
                    
                    StringBuilder sb = new StringBuilder();
                    for(int i=0;i<strs.length;i++){
                        //System.out.print(strs[i]);
                        sb.append(strs[i]);
                    }
                    System.out.println(sb.toString());
  }
}