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

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    char c[]=s.toCharArray();
    for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    }
    StringBuffer sb=new StringBuffer(new String(c));
    System.out.println(sb.toString());
  }
}
 import java.io.*; io.* java import java.util.*; util.* java public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    char c[]=s.toCharArray();
    for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    }
    StringBuffer sb=new StringBuffer(new String(c));
    System.out.println(sb.toString());
  }
} Main public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    char c[]=s.toCharArray();
    for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    }
    StringBuffer sb=new StringBuffer(new String(c));
    System.out.println(sb.toString());
  } main {
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    char c[]=s.toCharArray();
    for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    }
    StringBuffer sb=new StringBuffer(new String(c));
    System.out.println(sb.toString());
  } Scanner sc=new Scanner(System.in); sc new Scanner(System.in) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc char c[]=s.toCharArray(); c s.toCharArray() s.toCharArray s for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    } int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    } {
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    } if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      } Character.isUpperCase(c[i]) Character.isUpperCase Character c[i] c i {
        c[i]=Character.toLowerCase(c[i]);
      } c[i]=Character.toLowerCase(c[i]) c[i] c i Character.toLowerCase(c[i]) Character.toLowerCase Character c[i] c i if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      } Character.isLowerCase(c[i]) Character.isLowerCase Character c[i] c i {
        c[i]=Character.toUpperCase(c[i]);
      } c[i]=Character.toUpperCase(c[i]) c[i] c i Character.toUpperCase(c[i]) Character.toUpperCase Character c[i] c i StringBuffer sb=new StringBuffer(new String(c)); sb new StringBuffer(new String(c)) 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){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    char c[]=s.toCharArray();
    for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    }
    StringBuffer sb=new StringBuffer(new String(c));
    System.out.println(sb.toString());
  }
} public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    char c[]=s.toCharArray();
    for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    }
    StringBuffer sb=new StringBuffer(new String(c));
    System.out.println(sb.toString());
  }
} Main
import java.io.*;
import java.util.*;

public class Main{
  public static void main(String[] args){
    Scanner sc=new Scanner(System.in);
    String s=sc.nextLine();
    char c[]=s.toCharArray();
    for(int i=0;i<s.length();i++){
      if(Character.isUpperCase(c[i])){
        c[i]=Character.toLowerCase(c[i]);
      }else if(Character.isLowerCase(c[i])){
        c[i]=Character.toUpperCase(c[i]);
      }
    }
    StringBuffer sb=new StringBuffer(new String(c));
    System.out.println(sb.toString());
  }
}

