import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		String st = scan.nextLine();
		sb.append(st);

		int l = st.length();
		for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		}
		System.out.println(sb);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		String st = scan.nextLine();
		sb.append(st);

		int l = st.length();
		for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		}
		System.out.println(sb);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		String st = scan.nextLine();
		sb.append(st);

		int l = st.length();
		for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		}
		System.out.println(sb);
	} main {
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		String st = scan.nextLine();
		sb.append(st);

		int l = st.length();
		for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		}
		System.out.println(sb);
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) StringBuilder sb = new StringBuilder(); sb new StringBuilder() String st = scan.nextLine(); st scan.nextLine() scan.nextLine scan sb.append(st) sb.append sb st int l = st.length(); l st.length() st.length st for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		} int i = 0; int i = 0; i 0 i < l i l i++ i++ i {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		} {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		} char cha = sb.charAt(i); cha sb.charAt(i) sb.charAt sb i if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			} Character.isUpperCase(cha) Character.isUpperCase Character cha {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			} char lchar = Character.toLowerCase(cha); lchar Character.toLowerCase(cha) Character.toLowerCase Character cha sb.setCharAt(i, lchar) sb.setCharAt sb i lchar if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			} Character.isLowerCase(cha) Character.isLowerCase Character cha {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			} char uchar = Character.toUpperCase(cha); uchar Character.toUpperCase(cha) Character.toUpperCase Character cha sb.setCharAt(i, uchar) sb.setCharAt sb i uchar System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		String st = scan.nextLine();
		sb.append(st);

		int l = st.length();
		for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		}
		System.out.println(sb);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		String st = scan.nextLine();
		sb.append(st);

		int l = st.length();
		for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		}
		System.out.println(sb);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		StringBuilder sb = new StringBuilder();

		String st = scan.nextLine();
		sb.append(st);

		int l = st.length();
		for (int i = 0; i < l; i++) {
			char cha = sb.charAt(i);
			if ( Character.isUpperCase(cha) ) {
				char lchar = Character.toLowerCase(cha);
				sb.setCharAt(i, lchar);
			}else if ( Character.isLowerCase(cha) ) {
				char uchar = Character.toUpperCase(cha);
				sb.setCharAt(i, uchar);
			}
		}
		System.out.println(sb);
	}
}