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

public class Main{
	public static void main(String[] args) throws IOException {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));


		        	     //???????????\??????????????¨
		        	   String strings = input.readLine();

		        	   //?????????????????????????´????
			           String strings_words = strings;

			           //String??????strings_words???toCharArray()??§char????????????
			           char[] c=strings_words.toCharArray();

			           //
			           for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           }
  System.out.println("");


	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{
	public static void main(String[] args) throws IOException {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));


		        	     //???????????\??????????????¨
		        	   String strings = input.readLine();

		        	   //?????????????????????????´????
			           String strings_words = strings;

			           //String??????strings_words???toCharArray()??§char????????????
			           char[] c=strings_words.toCharArray();

			           //
			           for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           }
  System.out.println("");


	}

} Main public static void main(String[] args) throws IOException {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));


		        	     //???????????\??????????????¨
		        	   String strings = input.readLine();

		        	   //?????????????????????????´????
			           String strings_words = strings;

			           //String??????strings_words???toCharArray()??§char????????????
			           char[] c=strings_words.toCharArray();

			           //
			           for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           }
  System.out.println("");


	} main {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));


		        	     //???????????\??????????????¨
		        	   String strings = input.readLine();

		        	   //?????????????????????????´????
			           String strings_words = strings;

			           //String??????strings_words???toCharArray()??§char????????????
			           char[] c=strings_words.toCharArray();

			           //
			           for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           }
  System.out.println("");


	} BufferedReader input = new BufferedReader(new InputStreamReader(System.in)); input new BufferedReader(new InputStreamReader(System.in)) String strings = input.readLine(); strings input.readLine() input.readLine input String strings_words = strings; strings_words strings char[] c=strings_words.toCharArray(); c strings_words.toCharArray() strings_words.toCharArray strings_words for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           } char cl c {

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           } {

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           } String str__conversion= String.valueOf(cl); str__conversion String.valueOf(cl) String.valueOf String cl String output=""; output "" if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   } Character.isUpperCase(cl) Character.isUpperCase Character cl {

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   } output=  str__conversion.toLowerCase() output str__conversion.toLowerCase() str__conversion.toLowerCase str__conversion {

			        		    output= str__conversion.toUpperCase();

			        	   } output= str__conversion.toUpperCase() output str__conversion.toUpperCase() str__conversion.toUpperCase str__conversion System.out.print(output) System.out.print System.out System System.out output System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main{
	public static void main(String[] args) throws IOException {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));


		        	     //???????????\??????????????¨
		        	   String strings = input.readLine();

		        	   //?????????????????????????´????
			           String strings_words = strings;

			           //String??????strings_words???toCharArray()??§char????????????
			           char[] c=strings_words.toCharArray();

			           //
			           for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           }
  System.out.println("");


	}

} public class Main{
	public static void main(String[] args) throws IOException {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));


		        	     //???????????\??????????????¨
		        	   String strings = input.readLine();

		        	   //?????????????????????????´????
			           String strings_words = strings;

			           //String??????strings_words???toCharArray()??§char????????????
			           char[] c=strings_words.toCharArray();

			           //
			           for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           }
  System.out.println("");


	}

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

public class Main{
	public static void main(String[] args) throws IOException {

		BufferedReader input = new BufferedReader(new InputStreamReader(System.in));


		        	     //???????????\??????????????¨
		        	   String strings = input.readLine();

		        	   //?????????????????????????´????
			           String strings_words = strings;

			           //String??????strings_words???toCharArray()??§char????????????
			           char[] c=strings_words.toCharArray();

			           //
			           for(char cl: c){

			        	   //cl???String??????????????¨
			        	   String str__conversion= String.valueOf(cl);

			        	   String output="";

			        	   //cl?????????????????§??????????¢????
			        	   if(Character.isUpperCase(cl)){

			        		   //?°??????????
			        		   output=  str__conversion.toLowerCase();

			        		   //?°?????????????
			        	   }else{

			        		    output= str__conversion.toUpperCase();

			        	   }

			        	   System.out.print(output);

			           }
  System.out.println("");


	}

}