import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
	public static void main(String[] args) {
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder output = new StringBuilder();
		int c;
		try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
	public static void main(String[] args) {
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder output = new StringBuilder();
		int c;
		try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		}
	}
} Main public static void main(String[] args) {
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder output = new StringBuilder();
		int c;
		try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		}
	} main {
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder output = new StringBuilder();
		int c;
		try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		}
	} BufferedReader buf = new BufferedReader(new InputStreamReader(System.in)); buf new BufferedReader(new InputStreamReader(System.in)) StringBuilder output = new StringBuilder(); output new StringBuilder() int c; c try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			} (c = buf.read()) != (int)'\n' (c = buf.read()) c buf.read() buf.read buf (int)'\n' {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			} if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				} Character.isUpperCase((char) c) Character.isUpperCase Character (char) c {
					output.append(Character.toLowerCase((char) c));
				} output.append(Character.toLowerCase((char) c)) output.append output Character.toLowerCase((char) c) Character.toLowerCase Character (char) c if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				} Character.isLowerCase((char) c) Character.isLowerCase Character (char) c {
					output.append(Character.toUpperCase((char) c));
				} output.append(Character.toUpperCase((char) c)) output.append output Character.toUpperCase((char) c) Character.toUpperCase Character (char) c {
					output.append((char) c);
				} output.append((char) c) output.append output (char) c System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main {
	public static void main(String[] args) {
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder output = new StringBuilder();
		int c;
		try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		}
	}
} public class Main {
	public static void main(String[] args) {
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder output = new StringBuilder();
		int c;
		try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
	public static void main(String[] args) {
		BufferedReader buf = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder output = new StringBuilder();
		int c;
		try {
			while ((c = buf.read()) != (int)'\n') {
				if (Character.isUpperCase((char) c)) {
					output.append(Character.toLowerCase((char) c));
				} else if (Character.isLowerCase((char) c)) {
					output.append(Character.toUpperCase((char) c));
				} else {
					output.append((char) c);
				}
			}
			System.out.println(output);
		} catch (IOException e) {
			System.out.println(e);
		}
	}
}