import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String str = scan.nextLine();
		char[] c=str.toCharArray();
		
		for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		}
		
		str=String.valueOf(c);
		
		System.out.println(str);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String str = scan.nextLine();
		char[] c=str.toCharArray();
		
		for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		}
		
		str=String.valueOf(c);
		
		System.out.println(str);
		
	}
} Main public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String str = scan.nextLine();
		char[] c=str.toCharArray();
		
		for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		}
		
		str=String.valueOf(c);
		
		System.out.println(str);
		
	} main {
		Scanner scan=new Scanner(System.in);
		String str = scan.nextLine();
		char[] c=str.toCharArray();
		
		for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		}
		
		str=String.valueOf(c);
		
		System.out.println(str);
		
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan char[] c=str.toCharArray(); c str.toCharArray() str.toCharArray str for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		} int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		} {
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		} if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A'; c[i] >='a' && c[i]<='z' c[i] >='a' c[i] c i 'a' c[i]<='z' c[i] c i 'z' c[i]-='a'-'A' c[i] c i 'a'-'A' 'a' 'A' if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A'; c[i] >= 'A' && c[i] <= 'Z' c[i] >= 'A' c[i] c i 'A' c[i] <= 'Z' c[i] c i 'Z' c[i]+='a'-'A' c[i] c i 'a'-'A' 'a' 'A' str=String.valueOf(c) str String.valueOf(c) String.valueOf String c System.out.println(str) System.out.println System.out System System.out str String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String str = scan.nextLine();
		char[] c=str.toCharArray();
		
		for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		}
		
		str=String.valueOf(c);
		
		System.out.println(str);
		
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String str = scan.nextLine();
		char[] c=str.toCharArray();
		
		for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		}
		
		str=String.valueOf(c);
		
		System.out.println(str);
		
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String str = scan.nextLine();
		char[] c=str.toCharArray();
		
		for(int i=0;i<c.length;i++){
			if(c[i] >='a' && c[i]<='z')
				c[i]-='a'-'A';
			else if(c[i] >= 'A' && c[i] <= 'Z')
				c[i]+='a'-'A';
		}
		
		str=String.valueOf(c);
		
		System.out.println(str);
		
	}
}
