import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String str;
		Scanner sc = new Scanner(System.in);
		str = sc.nextLine();
		StringBuilder sb = new StringBuilder(str);
		for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		}
		System.out.println(sb);
		sc.close();
	}

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

	public static void main(String[] args) {
		String str;
		Scanner sc = new Scanner(System.in);
		str = sc.nextLine();
		StringBuilder sb = new StringBuilder(str);
		for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		}
		System.out.println(sb);
		sc.close();
	}

} Main public static void main(String[] args) {
		String str;
		Scanner sc = new Scanner(System.in);
		str = sc.nextLine();
		StringBuilder sb = new StringBuilder(str);
		for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		}
		System.out.println(sb);
		sc.close();
	} main {
		String str;
		Scanner sc = new Scanner(System.in);
		str = sc.nextLine();
		StringBuilder sb = new StringBuilder(str);
		for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		}
		System.out.println(sb);
		sc.close();
	} String str; str Scanner sc = new Scanner(System.in); sc new Scanner(System.in) str = sc.nextLine() str sc.nextLine() sc.nextLine sc StringBuilder sb = new StringBuilder(str); sb new StringBuilder(str) for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str ++i ++i i {
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		} {
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		} char judge = sb.charAt(i); judge sb.charAt(i) sb.charAt sb i if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			} Character.isLowerCase(judge) Character.isLowerCase Character judge {
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			} char tmp = Character.toUpperCase(judge); tmp Character.toUpperCase(judge) Character.toUpperCase Character judge sb.setCharAt(i,tmp) sb.setCharAt sb i tmp if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			} Character.isUpperCase(judge) Character.isUpperCase Character judge {
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			} char tmp = Character.toLowerCase(judge); tmp Character.toLowerCase(judge) Character.toLowerCase Character judge sb.setCharAt(i,tmp) sb.setCharAt sb i tmp System.out.println(sb) System.out.println System.out System System.out sb sc.close() sc.close sc String[] args args public class Main {

	public static void main(String[] args) {
		String str;
		Scanner sc = new Scanner(System.in);
		str = sc.nextLine();
		StringBuilder sb = new StringBuilder(str);
		for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		}
		System.out.println(sb);
		sc.close();
	}

} public class Main {

	public static void main(String[] args) {
		String str;
		Scanner sc = new Scanner(System.in);
		str = sc.nextLine();
		StringBuilder sb = new StringBuilder(str);
		for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		}
		System.out.println(sb);
		sc.close();
	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String str;
		Scanner sc = new Scanner(System.in);
		str = sc.nextLine();
		StringBuilder sb = new StringBuilder(str);
		for(int i = 0; i < str.length(); ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i,tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i,tmp);
			}
		}
		System.out.println(sb);
		sc.close();
	}

}