import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String c;
		c = sc.nextLine();

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

		for (int i = 0; i < c.length(); i++) {
			char t = c.charAt(i);
			if ('A' <= t && t <= 'Z') {
				t += 32;
			} else if ('a' <= t && t <= 'z') {
				t -= 32;
			}
			System.out.print(t);
		}
		System.out.println();
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String c;
		c = sc.nextLine();

		for (int i = 0; i < c.length(); i++) {
			char t = c.charAt(i);
			if ('A' <= t && t <= 'Z') {
				t += 32;
			} else if ('a' <= t && t <= 'z') {
				t -= 32;
			}
			System.out.print(t);
		}
		System.out.println();
	} main {
		Scanner sc = new Scanner(System.in);
		String c;
		c = sc.nextLine();

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

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

		for (int i = 0; i < c.length(); i++) {
			char t = c.charAt(i);
			if ('A' <= t && t <= 'Z') {
				t += 32;
			} else if ('a' <= t && t <= 'z') {
				t -= 32;
			}
			System.out.print(t);
		}
		System.out.println();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String c;
		c = sc.nextLine();

		for (int i = 0; i < c.length(); i++) {
			char t = c.charAt(i);
			if ('A' <= t && t <= 'Z') {
				t += 32;
			} else if ('a' <= t && t <= 'z') {
				t -= 32;
			}
			System.out.print(t);
		}
		System.out.println();
	}
}
