import java.util.Scanner;

public class Main{
  public static void main(String[]args){
      try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    }
  }
}
 import java.util.Scanner; Scanner java.util public class Main{
  public static void main(String[]args){
      try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    }
  }
} Main public static void main(String[]args){
      try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    }
  } main {
      try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    }
  } try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    } {
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    } Scanner sc = new Scanner(System.in) Scanner sc = new Scanner(System.in) new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc String answer = ""; answer "" int length = line.length(); length line.length() line.length line for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        } int i = 0; int i = 0; i 0 i<length i length i++ i++ i {
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        } {
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        } char ch = line.charAt(i); ch line.charAt(i) line.charAt line i if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          } Character.isLowerCase(ch) Character.isLowerCase Character ch {
              System.out.printf("%s", Character.toUpperCase(ch));
          } System.out.printf("%s", Character.toUpperCase(ch)) System.out.printf System.out System System.out "%s" Character.toUpperCase(ch) Character.toUpperCase Character ch {
              System.out.printf("%s", Character.toLowerCase(ch));
          } System.out.printf("%s", Character.toLowerCase(ch)) System.out.printf System.out System System.out "%s" Character.toLowerCase(ch) Character.toLowerCase Character ch System.out.println("") System.out.println System.out System System.out "" String[]args args public class Main{
  public static void main(String[]args){
      try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    }
  }
} public class Main{
  public static void main(String[]args){
      try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    }
  }
} Main
import java.util.Scanner;

public class Main{
  public static void main(String[]args){
      try(Scanner sc = new Scanner(System.in)){
        String line = sc.nextLine();
        String answer = "";
        int length = line.length();
        for(int i = 0; i<length; i++){
          char ch = line.charAt(i);
          if(Character.isLowerCase(ch)){
              System.out.printf("%s", Character.toUpperCase(ch));
          }else{
              System.out.printf("%s", Character.toLowerCase(ch));
          }
        }
        System.out.println("");
    }
  }
}

