

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 = br.readLine();

		// ????????????1????????????????????????????????????????´?
		char[] strArray = str.toCharArray();

		for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		}

		for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		}

		System.out.println(strArray[strArray.length - 1]);

	}
} 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 = br.readLine();

		// ????????????1????????????????????????????????????????´?
		char[] strArray = str.toCharArray();

		for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		}

		for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		}

		System.out.println(strArray[strArray.length - 1]);

	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		// ????????????1????????????????????????????????????????´?
		char[] strArray = str.toCharArray();

		for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		}

		for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		}

		System.out.println(strArray[strArray.length - 1]);

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		// ????????????1????????????????????????????????????????´?
		char[] strArray = str.toCharArray();

		for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		}

		for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		}

		System.out.println(strArray[strArray.length - 1]);

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br char[] strArray = str.toCharArray(); strArray str.toCharArray() str.toCharArray str for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		} int i = 0; int i = 0; i 0 i < strArray.length i strArray.length strArray strArray.length i++ i++ i {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		} {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		} if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			} Character.isUpperCase(strArray[i]) Character.isUpperCase Character strArray[i] strArray i {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} strArray[i] = Character.toLowerCase(strArray[i]) strArray[i] strArray i Character.toLowerCase(strArray[i]) Character.toLowerCase Character strArray[i] strArray i if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			} Character.isLowerCase(strArray[i]) Character.isLowerCase Character strArray[i] strArray i {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			} strArray[i] = Character.toUpperCase(strArray[i]) strArray[i] strArray i Character.toUpperCase(strArray[i]) Character.toUpperCase Character strArray[i] strArray i for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		} int i = 0; int i = 0; i 0 i < strArray.length - 1 i strArray.length - 1 strArray.length strArray strArray.length 1 i++ i++ i {

			System.out.print(strArray[i]);

		} {

			System.out.print(strArray[i]);

		} System.out.print(strArray[i]) System.out.print System.out System System.out strArray[i] strArray i System.out.println(strArray[strArray.length - 1]) System.out.println System.out System System.out strArray[strArray.length - 1] strArray strArray.length - 1 strArray.length strArray strArray.length 1 String[] args args public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		// ????????????1????????????????????????????????????????´?
		char[] strArray = str.toCharArray();

		for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		}

		for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		}

		System.out.println(strArray[strArray.length - 1]);

	}
} public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		String str = br.readLine();

		// ????????????1????????????????????????????????????????´?
		char[] strArray = str.toCharArray();

		for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		}

		for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		}

		System.out.println(strArray[strArray.length - 1]);

	}
} Main


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 = br.readLine();

		// ????????????1????????????????????????????????????????´?
		char[] strArray = str.toCharArray();

		for (int i = 0; i < strArray.length; i++) {

			// ??§???????????????
			if (Character.isUpperCase(strArray[i])) {

				// ?°????????????????
				strArray[i] = Character.toLowerCase(strArray[i]);

			// ?°????????????????
			} else if (Character.isLowerCase(strArray[i])) {

				// ??§???????????????
				strArray[i] = Character.toUpperCase(strArray[i]);

			

				

			}

		}

		for (int i = 0; i < strArray.length - 1; i++) {

			System.out.print(strArray[i]);

		}

		System.out.println(strArray[strArray.length - 1]);

	}
}