import java.util.*;
public class Main{
      public static void main(String[] args){
          Scanner sc =new Scanner (System.in);
          String a;
          int n ;
          a = sc.nextLine();
          int l =a.length();
          for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             }
          
          System.out.printf("\n");
            }


          

    

} import java.util.*; util.* java public class Main{
      public static void main(String[] args){
          Scanner sc =new Scanner (System.in);
          String a;
          int n ;
          a = sc.nextLine();
          int l =a.length();
          for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             }
          
          System.out.printf("\n");
            }


          

    

} Main public static void main(String[] args){
          Scanner sc =new Scanner (System.in);
          String a;
          int n ;
          a = sc.nextLine();
          int l =a.length();
          for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             }
          
          System.out.printf("\n");
            } main {
          Scanner sc =new Scanner (System.in);
          String a;
          int n ;
          a = sc.nextLine();
          int l =a.length();
          for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             }
          
          System.out.printf("\n");
            } Scanner sc =new Scanner (System.in); sc new Scanner (System.in) String a; a int n ; n a = sc.nextLine() a sc.nextLine() sc.nextLine sc int l =a.length(); l a.length() a.length a for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             } n=0; n=0 n 0 n<l n l n++ n++ n {
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             } {
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             } char b =a.charAt(n); b a.charAt(n) a.charAt a n if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              } Character.isLowerCase(b) Character.isLowerCase Character b {
                  System.out.print(Character.toUpperCase(b));
              } System.out.print(Character.toUpperCase(b)) System.out.print System.out System System.out Character.toUpperCase(b) Character.toUpperCase Character b if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              } Character.isUpperCase(b) Character.isUpperCase Character b {
                  System.out.print(Character.toLowerCase(b));
              } System.out.print(Character.toLowerCase(b)) System.out.print System.out System System.out Character.toLowerCase(b) Character.toLowerCase Character b {
                  System.out.print(b);
              } System.out.print(b) System.out.print System.out System System.out b System.out.printf("\n") System.out.printf System.out System System.out "\n" String[] args args public class Main{
      public static void main(String[] args){
          Scanner sc =new Scanner (System.in);
          String a;
          int n ;
          a = sc.nextLine();
          int l =a.length();
          for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             }
          
          System.out.printf("\n");
            }


          

    

} public class Main{
      public static void main(String[] args){
          Scanner sc =new Scanner (System.in);
          String a;
          int n ;
          a = sc.nextLine();
          int l =a.length();
          for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             }
          
          System.out.printf("\n");
            }


          

    

} Main
import java.util.*;
public class Main{
      public static void main(String[] args){
          Scanner sc =new Scanner (System.in);
          String a;
          int n ;
          a = sc.nextLine();
          int l =a.length();
          for (n=0;n<l;n++){
              char b =a.charAt(n);
              if(Character.isLowerCase(b)){
                  System.out.print(Character.toUpperCase(b));
              }else if(Character.isUpperCase(b)){
                  System.out.print(Character.toLowerCase(b));
              }else{
                  System.out.print(b);
              }
             }
          
          System.out.printf("\n");
            }


          

    

}
