import java.util.*;
import java.text.*;
/*
Main class for AOJ where there is no input.
*/
public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      char temp;
      
      for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      }
      System.out.println();
   }//main
}//class import java.util.*; util.* java import java.text.*; text.* java public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      char temp;
      
      for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      }
      System.out.println();
   }//main
}//class Main public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      char temp;
      
      for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      }
      System.out.println();
   }//main main {
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      char temp;
      
      for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      }
      System.out.println();
   } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char temp; temp for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i ++ i ++ i {
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      } {
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      } temp = str.charAt(i) temp str.charAt(i) str.charAt str i if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         } Character.isUpperCase(temp) Character.isUpperCase Character temp {
            temp = Character.toLowerCase(temp);
         } temp = Character.toLowerCase(temp) temp Character.toLowerCase(temp) Character.toLowerCase Character temp {
            temp = Character.toUpperCase(temp);
         } temp = Character.toUpperCase(temp) temp Character.toUpperCase(temp) Character.toUpperCase Character temp System.out.print(temp) System.out.print System.out System System.out temp System.out.println() System.out.println System.out System System.out String[] args args public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      char temp;
      
      for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      }
      System.out.println();
   }//main
}//class public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      char temp;
      
      for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      }
      System.out.println();
   }//main
}//class Main
import java.util.*;
import java.text.*;
/*
Main class for AOJ where there is no input.
*/
public class Main{
   public static void main(String[] args){
      Scanner sc = new Scanner(System.in);
      String str = sc.nextLine();
      char temp;
      
      for(int i = 0; i < str.length(); i ++){
         temp = str.charAt(i);
         if(Character.isUpperCase(temp)){
            temp = Character.toLowerCase(temp);
         }else{
            temp = Character.toUpperCase(temp);
         }
         System.out.print(temp);
      }
      System.out.println();
   }//main
}//class