import static java.lang.Character.*;

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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		}
	}

} import static java.lang.Character.*; import static java.lang.Character.*; import static java.lang.Character.*; import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		}
	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		} (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		} for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			} {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			} char c = str.charAt(i); c str.charAt(i) str.charAt str i if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				} isLetter(c) isLetter c {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					} isUpperCase(c) isUpperCase c {
						System.out.print(toLowerCase(c));
					} System.out.print(toLowerCase(c)) System.out.print System.out System System.out toLowerCase(c) toLowerCase c {
						System.out.print(toUpperCase(c));
					} System.out.print(toUpperCase(c)) System.out.print System.out System System.out toUpperCase(c) toUpperCase c {
					System.out.print(c);
				} System.out.print(c) System.out.print System.out System System.out c System.out.println() System.out.println System.out System System.out String[] args args public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		}
	}

} public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		}
	}

} Main
import static java.lang.Character.*;

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

public class Main {

	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		while ((str = br.readLine()) != null) {
			for (int i = 0; i < str.length(); i++) {
				char c = str.charAt(i);
				if (isLetter(c)) {
					if (isUpperCase(c)) {
						System.out.print(toLowerCase(c));
					} else {
						System.out.print(toUpperCase(c));
					}
				} else {
					System.out.print(c);
				}
			}
			System.out.println();
		}
	}

}