import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner scan = null;
		try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		}
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner scan = null;
		try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		}
	}
} Main public static void main(String[] args){
		Scanner scan = null;
		try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		}
	} main {
		Scanner scan = null;
		try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		}
	} Scanner scan = null; scan null try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		} {
			if(scan !=null)scan.close();
		} if(scan !=null)scan.close(); scan !=null scan null scan.close() scan.close scan {
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		} scan = new Scanner(System.in) scan new Scanner(System.in) char[] str = scan.nextLine().toCharArray(); str scan.nextLine().toCharArray() scan.nextLine().toCharArray scan.nextLine() scan.nextLine scan for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			} int i = 0; int i = 0; i 0 i < str.length i str.length str str.length i++ i++ i {
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			} {
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			} if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]); Character.isLowerCase(str[i]) Character.isLowerCase Character str[i] str i {
					System.out.print(Character.toUpperCase(str[i]));
				} System.out.print(Character.toUpperCase(str[i])) System.out.print System.out System System.out Character.toUpperCase(str[i]) Character.toUpperCase Character str[i] str i if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]); Character.isUpperCase(str[i]) Character.isUpperCase Character str[i] str i {
					System.out.print(Character.toLowerCase(str[i]));
				} System.out.print(Character.toLowerCase(str[i])) System.out.print System.out System System.out Character.toLowerCase(str[i]) Character.toLowerCase Character str[i] str i System.out.print(str[i]) System.out.print System.out System System.out str[i] str i System.out.println() System.out.println System.out System System.out String[] args args public class Main{
	public static void main(String[] args){
		Scanner scan = null;
		try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		}
	}
} public class Main{
	public static void main(String[] args){
		Scanner scan = null;
		try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		}
	}
} Main
import java.util.Scanner;
public class Main{
	public static void main(String[] args){
		Scanner scan = null;
		try{
			scan = new Scanner(System.in);
			char[] str = scan.nextLine().toCharArray();
			for(int i = 0; i < str.length;i++){
				if(Character.isLowerCase(str[i])){
					System.out.print(Character.toUpperCase(str[i]));
				}else if(Character.isUpperCase(str[i])){
					System.out.print(Character.toLowerCase(str[i]));
				}else
					System.out.print(str[i]);
			}
			System.out.println();
		}finally{
			if(scan !=null)scan.close();
		}
	}
}