import java.util.Scanner;
  
class Main{
  public static void main(String[] arg){
    String input;
    StringBuffer output = new StringBuffer();
 
    Scanner in = new Scanner(System.in);

    input = in.nextLine();

    for(int i=0; i<input.length(); i++){
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    }

    System.out.println(output.toString());
 
  }
} import java.util.Scanner; Scanner java.util class Main{
  public static void main(String[] arg){
    String input;
    StringBuffer output = new StringBuffer();
 
    Scanner in = new Scanner(System.in);

    input = in.nextLine();

    for(int i=0; i<input.length(); i++){
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    }

    System.out.println(output.toString());
 
  }
} Main public static void main(String[] arg){
    String input;
    StringBuffer output = new StringBuffer();
 
    Scanner in = new Scanner(System.in);

    input = in.nextLine();

    for(int i=0; i<input.length(); i++){
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    }

    System.out.println(output.toString());
 
  } main {
    String input;
    StringBuffer output = new StringBuffer();
 
    Scanner in = new Scanner(System.in);

    input = in.nextLine();

    for(int i=0; i<input.length(); i++){
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    }

    System.out.println(output.toString());
 
  } String input; input StringBuffer output = new StringBuffer(); output new StringBuffer() Scanner in = new Scanner(System.in); in new Scanner(System.in) input = in.nextLine() input in.nextLine() in.nextLine in for(int i=0; i<input.length(); i++){
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    } int i=0; int i=0; i 0 i<input.length() i input.length() input.length input i++ i++ i {
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    } {
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    } char ch = input.charAt(i); ch input.charAt(i) input.charAt input i if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch); Character.isLowerCase(ch) Character.isLowerCase Character ch output.append(Character.toUpperCase(ch)) output.append output Character.toUpperCase(ch) Character.toUpperCase Character ch if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch); Character.isUpperCase(ch) Character.isUpperCase Character ch output.append(Character.toLowerCase(ch)) output.append output Character.toLowerCase(ch) Character.toLowerCase Character ch output.append(ch) output.append output ch System.out.println(output.toString()) System.out.println System.out System System.out output.toString() output.toString output String[] arg arg
import java.util.Scanner;
  
class Main{
  public static void main(String[] arg){
    String input;
    StringBuffer output = new StringBuffer();
 
    Scanner in = new Scanner(System.in);

    input = in.nextLine();

    for(int i=0; i<input.length(); i++){
        char ch = input.charAt(i);
        if(Character.isLowerCase(ch))
            output.append(Character.toUpperCase(ch));
        else if(Character.isUpperCase(ch))
            output.append(Character.toLowerCase(ch));
        else
            output.append(ch);
    }

    System.out.println(output.toString());
 
  }
}