import java.util.*;
import java.io.*;
import static java.lang.System.*;
import static java.lang.Math.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    }
    System.out.println("");
  }
} import java.util.*; util.* java import java.io.*; io.* java import static java.lang.System.*; import static java.lang.System.*; import static java.lang.System.*; import static java.lang.Math.*; import static java.lang.Math.*; import static java.lang.Math.*; public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    }
    System.out.println("");
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    }
    System.out.println("");
  } main {
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    }
    System.out.println("");
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    } {
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    } if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      } Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
        System.out.print(Character.toLowerCase(str.charAt(i)));
      } System.out.print(Character.toLowerCase(str.charAt(i))) System.out.print System.out System System.out Character.toLowerCase(str.charAt(i)) Character.toLowerCase Character str.charAt(i) str.charAt str i {
        System.out.print(Character.toUpperCase(str.charAt(i)));
      } System.out.print(Character.toUpperCase(str.charAt(i))) System.out.print System.out System System.out Character.toUpperCase(str.charAt(i)) Character.toUpperCase Character str.charAt(i) str.charAt str i 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();
    for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    }
    System.out.println("");
  }
} public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    }
    System.out.println("");
  }
} Main
import java.util.*;
import java.io.*;
import static java.lang.System.*;
import static java.lang.Math.*;

public class Main {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String str = sc.nextLine();
    for(int i=0; i<str.length(); i++){
      if(Character.isUpperCase(str.charAt(i))){
        System.out.print(Character.toLowerCase(str.charAt(i)));
      }else{
        System.out.print(Character.toUpperCase(str.charAt(i)));
      }
    }
    System.out.println("");
  }
}
