import java.util.Scanner;

public class Main {

public static void main(String[] args) {

		//??\??????????????????????????????Scanner???????????§???????????????
		Scanner scan = new Scanner(System.in);

		//???????????????????????????
		String text = scan.nextLine();

		//?????£??????????????\??????????????????
		char[] c = text.toCharArray();

		//??§?????????????°??????????????°???????????????§????????????????????????
		for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		}

		//String????????¨?????????
		String s ="";
		//char?????????String?????????1???????????????
		for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		}
		//??¨?????¨?????°
		System.out.println(s);


	}

} import java.util.Scanner; Scanner java.util public class Main {

public static void main(String[] args) {

		//??\??????????????????????????????Scanner???????????§???????????????
		Scanner scan = new Scanner(System.in);

		//???????????????????????????
		String text = scan.nextLine();

		//?????£??????????????\??????????????????
		char[] c = text.toCharArray();

		//??§?????????????°??????????????°???????????????§????????????????????????
		for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		}

		//String????????¨?????????
		String s ="";
		//char?????????String?????????1???????????????
		for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		}
		//??¨?????¨?????°
		System.out.println(s);


	}

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

		//??\??????????????????????????????Scanner???????????§???????????????
		Scanner scan = new Scanner(System.in);

		//???????????????????????????
		String text = scan.nextLine();

		//?????£??????????????\??????????????????
		char[] c = text.toCharArray();

		//??§?????????????°??????????????°???????????????§????????????????????????
		for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		}

		//String????????¨?????????
		String s ="";
		//char?????????String?????????1???????????????
		for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		}
		//??¨?????¨?????°
		System.out.println(s);


	} main {

		//??\??????????????????????????????Scanner???????????§???????????????
		Scanner scan = new Scanner(System.in);

		//???????????????????????????
		String text = scan.nextLine();

		//?????£??????????????\??????????????????
		char[] c = text.toCharArray();

		//??§?????????????°??????????????°???????????????§????????????????????????
		for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		}

		//String????????¨?????????
		String s ="";
		//char?????????String?????????1???????????????
		for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		}
		//??¨?????¨?????°
		System.out.println(s);


	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String text = scan.nextLine(); text scan.nextLine() scan.nextLine scan char[] c = text.toCharArray(); c text.toCharArray() text.toCharArray text for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		} int i=0; int i=0; i 0 i< c.length i c.length c c.length i++ i++ i {
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		} {
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		} if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			} Character.isLowerCase(c[i]) Character.isLowerCase Character c[i] c i {
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} c[i] = Character.toUpperCase(c[i]) c[i] c i Character.toUpperCase(c[i]) Character.toUpperCase Character c[i] c i {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			} c[i] = Character.toLowerCase(c[i]) c[i] c i Character.toLowerCase(c[i]) Character.toLowerCase Character c[i] c i String s =""; s "" for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			s += String.valueOf(c[i]);
		} {
			s += String.valueOf(c[i]);
		} s += String.valueOf(c[i]) s String.valueOf(c[i]) String.valueOf String c[i] c i System.out.println(s) System.out.println System.out System System.out s String[] args args public class Main {

public static void main(String[] args) {

		//??\??????????????????????????????Scanner???????????§???????????????
		Scanner scan = new Scanner(System.in);

		//???????????????????????????
		String text = scan.nextLine();

		//?????£??????????????\??????????????????
		char[] c = text.toCharArray();

		//??§?????????????°??????????????°???????????????§????????????????????????
		for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		}

		//String????????¨?????????
		String s ="";
		//char?????????String?????????1???????????????
		for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		}
		//??¨?????¨?????°
		System.out.println(s);


	}

} public class Main {

public static void main(String[] args) {

		//??\??????????????????????????????Scanner???????????§???????????????
		Scanner scan = new Scanner(System.in);

		//???????????????????????????
		String text = scan.nextLine();

		//?????£??????????????\??????????????????
		char[] c = text.toCharArray();

		//??§?????????????°??????????????°???????????????§????????????????????????
		for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		}

		//String????????¨?????????
		String s ="";
		//char?????????String?????????1???????????????
		for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		}
		//??¨?????¨?????°
		System.out.println(s);


	}

} Main
import java.util.Scanner;

public class Main {

public static void main(String[] args) {

		//??\??????????????????????????????Scanner???????????§???????????????
		Scanner scan = new Scanner(System.in);

		//???????????????????????????
		String text = scan.nextLine();

		//?????£??????????????\??????????????????
		char[] c = text.toCharArray();

		//??§?????????????°??????????????°???????????????§????????????????????????
		for(int i=0;i< c.length ; i++ ){
			//System.out.println(c[i]);
			if( Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
				//System.out.println(c[i]);
			} else {
				c[i] = Character.toLowerCase(c[i]);
				//System.out.println(c[i]);
			}
		}

		//String????????¨?????????
		String s ="";
		//char?????????String?????????1???????????????
		for(int i = 0; i < c.length ; i++ ){
			s += String.valueOf(c[i]);
		}
		//??¨?????¨?????°
		System.out.println(s);


	}

}