

import java.util.Scanner;

public class Main {
	public static void main(String []args){
		//????????£????????????
		Scanner sc = new Scanner(System.in);
		//??\???????????????????????£?????????
		String word =sc.nextLine();
		//
		StringBuilder out = new StringBuilder();
		//??£?¨?
		 String w;
		 //
		 for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 }

		 //??¨???
		 System.out.println(out);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String []args){
		//????????£????????????
		Scanner sc = new Scanner(System.in);
		//??\???????????????????????£?????????
		String word =sc.nextLine();
		//
		StringBuilder out = new StringBuilder();
		//??£?¨?
		 String w;
		 //
		 for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 }

		 //??¨???
		 System.out.println(out);
	}
} Main public static void main(String []args){
		//????????£????????????
		Scanner sc = new Scanner(System.in);
		//??\???????????????????????£?????????
		String word =sc.nextLine();
		//
		StringBuilder out = new StringBuilder();
		//??£?¨?
		 String w;
		 //
		 for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 }

		 //??¨???
		 System.out.println(out);
	} main {
		//????????£????????????
		Scanner sc = new Scanner(System.in);
		//??\???????????????????????£?????????
		String word =sc.nextLine();
		//
		StringBuilder out = new StringBuilder();
		//??£?¨?
		 String w;
		 //
		 for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 }

		 //??¨???
		 System.out.println(out);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String word =sc.nextLine(); word sc.nextLine() sc.nextLine sc StringBuilder out = new StringBuilder(); out new StringBuilder() String w; w for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 } int i =0; int i =0; i 0 i<word.length() i word.length() word.length word i++ i++ i {
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 } {
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 } w= word.substring(i,i+1) w word.substring(i,i+1) word.substring word i i+1 i 1 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			} w.equals(w.toLowerCase()) w.equals w w.toLowerCase() w.toLowerCase w {
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			} w = w.toUpperCase() w w.toUpperCase() w.toUpperCase w if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			} w.equals(w.toUpperCase()) w.equals w w.toUpperCase() w.toUpperCase w {
				w = w.toLowerCase();
			} w = w.toLowerCase() w w.toLowerCase() w.toLowerCase w System.out.append(w) System.out.append System.out System System.out w System.out.println(out) System.out.println System.out System System.out out String []args args public class Main {
	public static void main(String []args){
		//????????£????????????
		Scanner sc = new Scanner(System.in);
		//??\???????????????????????£?????????
		String word =sc.nextLine();
		//
		StringBuilder out = new StringBuilder();
		//??£?¨?
		 String w;
		 //
		 for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 }

		 //??¨???
		 System.out.println(out);
	}
} public class Main {
	public static void main(String []args){
		//????????£????????????
		Scanner sc = new Scanner(System.in);
		//??\???????????????????????£?????????
		String word =sc.nextLine();
		//
		StringBuilder out = new StringBuilder();
		//??£?¨?
		 String w;
		 //
		 for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 }

		 //??¨???
		 System.out.println(out);
	}
} Main


import java.util.Scanner;

public class Main {
	public static void main(String []args){
		//????????£????????????
		Scanner sc = new Scanner(System.in);
		//??\???????????????????????£?????????
		String word =sc.nextLine();
		//
		StringBuilder out = new StringBuilder();
		//??£?¨?
		 String w;
		 //
		 for(int i =0; i<word.length();i++){
			 w= word.substring(i,i+1);
			//?????£?????\?????????????°???????????????§???????????????
			 if(w.equals(w.toLowerCase())){
				 w = w.toUpperCase();
			//?????£?????\??????????????§?????????????°????????????????
			}else if(w.equals(w.toUpperCase())){
				w = w.toLowerCase();
			}
			 System.out.append(w);
		 }

		 //??¨???
		 System.out.println(out);
	}
}