import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
  public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine();
   String[] token = line.split("");


   for (int i = 0; i < token.length; i++){
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   }

   System.out.println();

  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{
  public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine();
   String[] token = line.split("");


   for (int i = 0; i < token.length; i++){
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   }

   System.out.println();

  }
} Main public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine();
   String[] token = line.split("");


   for (int i = 0; i < token.length; i++){
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   }

   System.out.println();

  } main {
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine();
   String[] token = line.split("");


   for (int i = 0; i < token.length; i++){
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   }

   System.out.println();

  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br String[] token = line.split(""); token line.split("") line.split line "" for (int i = 0; i < token.length; i++){
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   } int i = 0; int i = 0; i 0 i < token.length i token.length token token.length i++ i++ i {
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   } {
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   } if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   } Character.isUpperCase(line.charAt(i) ) Character.isUpperCase Character line.charAt(i) line.charAt line i {
		   token[i] = token[i].toLowerCase();
	   } token[i] = token[i].toLowerCase() token[i] token i token[i].toLowerCase() token[i].toLowerCase token[i] token i if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   } Character.isLowerCase(line.charAt(i)) Character.isLowerCase Character line.charAt(i) line.charAt line i {
		   token[i] = token[i].toUpperCase();
	   } token[i] = token[i].toUpperCase() token[i] token i token[i].toUpperCase() token[i].toUpperCase token[i] token i System.out.print(token[i]) System.out.print System.out System System.out token[i] token i System.out.println() System.out.println System.out System System.out String args[] args
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

class Main{
  public static void main(String args[]) throws IOException{
   BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
   String line = br.readLine();
   String[] token = line.split("");


   for (int i = 0; i < token.length; i++){
	   if( Character.isUpperCase(line.charAt(i) )){
		   token[i] = token[i].toLowerCase();
	   }else if( Character.isLowerCase(line.charAt(i)) ){
		   token[i] = token[i].toUpperCase();
	   }
	   System.out.print(token[i]);
   }

   System.out.println();

  }
}