import java.util.*;

public class Main {
	private static Scanner sc=new Scanner(System.in);;

	public static void main(String args[]) {
		char []a=sc.nextLine().toCharArray();
		for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		}
		for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		}
		System.out.println();
		/*System.out.println((int )'a'+" "+(int)'z');
		System.out.println((int)'A'+" "+(int)'Z');
		System.out.println((int)'a'-'A');
		System.out.println((int)'z'-'Z');
		 */
	}
} import java.util.*; util.* java public class Main {
	private static Scanner sc=new Scanner(System.in);;

	public static void main(String args[]) {
		char []a=sc.nextLine().toCharArray();
		for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		}
		for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		}
		System.out.println();
		/*System.out.println((int )'a'+" "+(int)'z');
		System.out.println((int)'A'+" "+(int)'Z');
		System.out.println((int)'a'-'A');
		System.out.println((int)'z'-'Z');
		 */
	}
} Main private static Scanner sc=new Scanner(System.in); sc new Scanner(System.in) public static void main(String args[]) {
		char []a=sc.nextLine().toCharArray();
		for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		}
		for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		}
		System.out.println();
		/*System.out.println((int )'a'+" "+(int)'z');
		System.out.println((int)'A'+" "+(int)'Z');
		System.out.println((int)'a'-'A');
		System.out.println((int)'z'-'Z');
		 */
	} main {
		char []a=sc.nextLine().toCharArray();
		for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		}
		for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		}
		System.out.println();
		/*System.out.println((int )'a'+" "+(int)'z');
		System.out.println((int)'A'+" "+(int)'Z');
		System.out.println((int)'a'-'A');
		System.out.println((int)'z'-'Z');
		 */
	} char []a=sc.nextLine().toCharArray(); a sc.nextLine().toCharArray() sc.nextLine().toCharArray sc.nextLine() sc.nextLine sc for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		} int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		} {
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		} if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			} a[i]>=97&&a[i]<=122 a[i]>=97 a[i] a i 97 a[i]<=122 a[i] a i 122 {
				a[i]-=32;
			} a[i]-=32 a[i] a i 32 if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			} 65<=a[i]&&a[i]<=90 65<=a[i] 65 a[i] a i a[i]<=90 a[i] a i 90 {
				a[i]+=32;
			} a[i]+=32 a[i] a i 32 for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		} int i=0; int i=0; i 0 i<a.length i a.length a a.length i++ i++ i {
			System.out.print(a[i]);
		} {
			System.out.print(a[i]);
		} System.out.print(a[i]) System.out.print System.out System System.out a[i] a i System.out.println() System.out.println System.out System System.out String args[] args public class Main {
	private static Scanner sc=new Scanner(System.in);;

	public static void main(String args[]) {
		char []a=sc.nextLine().toCharArray();
		for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		}
		for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		}
		System.out.println();
		/*System.out.println((int )'a'+" "+(int)'z');
		System.out.println((int)'A'+" "+(int)'Z');
		System.out.println((int)'a'-'A');
		System.out.println((int)'z'-'Z');
		 */
	}
} public class Main {
	private static Scanner sc=new Scanner(System.in);;

	public static void main(String args[]) {
		char []a=sc.nextLine().toCharArray();
		for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		}
		for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		}
		System.out.println();
		/*System.out.println((int )'a'+" "+(int)'z');
		System.out.println((int)'A'+" "+(int)'Z');
		System.out.println((int)'a'-'A');
		System.out.println((int)'z'-'Z');
		 */
	}
} Main
import java.util.*;

public class Main {
	private static Scanner sc=new Scanner(System.in);;

	public static void main(String args[]) {
		char []a=sc.nextLine().toCharArray();
		for(int i=0;i<a.length;i++){
			if(a[i]>=97&&a[i]<=122){
				a[i]-=32;
			}else if(65<=a[i]&&a[i]<=90){
				a[i]+=32;
			}
		}
		for(int i=0;i<a.length;i++){
			System.out.print(a[i]);
		}
		System.out.println();
		/*System.out.println((int )'a'+" "+(int)'z');
		System.out.println((int)'A'+" "+(int)'Z');
		System.out.println((int)'a'-'A');
		System.out.println((int)'z'-'Z');
		 */
	}
}