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