import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String strIn = scan.nextLine();
		String strAns = "";
		char charTemp;
		for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		}
		System.out.println(strAns);
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String strIn = scan.nextLine();
		String strAns = "";
		char charTemp;
		for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		}
		System.out.println(strAns);
		scan.close();
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String strIn = scan.nextLine();
		String strAns = "";
		char charTemp;
		for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		}
		System.out.println(strAns);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		String strIn = scan.nextLine();
		String strAns = "";
		char charTemp;
		for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		}
		System.out.println(strAns);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String strIn = scan.nextLine(); strIn scan.nextLine() scan.nextLine scan String strAns = ""; strAns "" char charTemp; charTemp for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		} int i = 0; int i = 0; i 0 i < strIn.length() i strIn.length() strIn.length strIn i++ i++ i {
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		} {
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		} charTemp = strIn.charAt(i) charTemp strIn.charAt(i) strIn.charAt strIn i if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			} Character.isLowerCase(charTemp) Character.isLowerCase Character charTemp {
				charTemp = Character.toUpperCase(charTemp);
			} charTemp = Character.toUpperCase(charTemp) charTemp Character.toUpperCase(charTemp) Character.toUpperCase Character charTemp if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			} Character.isUpperCase(charTemp) Character.isUpperCase Character charTemp {
				charTemp = Character.toLowerCase(charTemp);
			} charTemp = Character.toLowerCase(charTemp) charTemp Character.toLowerCase(charTemp) Character.toLowerCase Character charTemp strAns += charTemp strAns charTemp System.out.println(strAns) System.out.println System.out System System.out strAns scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String strIn = scan.nextLine();
		String strAns = "";
		char charTemp;
		for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		}
		System.out.println(strAns);
		scan.close();
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String strIn = scan.nextLine();
		String strAns = "";
		char charTemp;
		for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		}
		System.out.println(strAns);
		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		String strIn = scan.nextLine();
		String strAns = "";
		char charTemp;
		for(int i = 0; i < strIn.length(); i++){
			charTemp = strIn.charAt(i);
			if(Character.isLowerCase(charTemp)){
				charTemp = Character.toUpperCase(charTemp);
			}else if(Character.isUpperCase(charTemp)){
				charTemp = Character.toLowerCase(charTemp);
			}
			strAns += charTemp;
		}
		System.out.println(strAns);
		scan.close();
	}
}