import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = null;

		String anser = "";

		try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		}

	}

} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		Scanner sc = null;

		String anser = "";

		try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		}

	}

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

		Scanner sc = null;

		String anser = "";

		try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		}

	} main {

		Scanner sc = null;

		String anser = "";

		try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		}

	} Scanner sc = null; sc null String anser = ""; anser "" try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		} {
			sc.close();
		} sc.close() sc.close sc {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} sc = new Scanner(System.in) sc new Scanner(System.in) String line = sc.nextLine(); line sc.nextLine() sc.nextLine sc char[] check = line.toCharArray(); check line.toCharArray() line.toCharArray line for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			} int i = 0; int i = 0; i 0 i < check.length i check.length check check.length i++ i++ i {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			} {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			} if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				} Character.isUpperCase(check[i]) Character.isUpperCase Character check[i] check i {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				} check[i] = Character.toLowerCase(check[i]) check[i] check i Character.toLowerCase(check[i]) Character.toLowerCase Character check[i] check i {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				} check[i] = Character.toUpperCase(check[i]) check[i] check i Character.toUpperCase(check[i]) Character.toUpperCase Character check[i] check i System.out.println(check) System.out.println System.out System System.out check String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = null;

		String anser = "";

		try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		}

	}

} public class Main {

	public static void main(String[] args) {

		Scanner sc = null;

		String anser = "";

		try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		}

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = null;

		String anser = "";

		try {
			//??\?????????
			sc = new Scanner(System.in);
			String line = sc.nextLine();

			char[] check = line.toCharArray();

			//?????????????????\????????§??????
			for (int i = 0; i < check.length; i++) {
				if (Character.isUpperCase(check[i])) {
					//?°????????????????
					check[i] = Character.toLowerCase(check[i]);
				}else {
					//??§???????????????
					check[i] = Character.toUpperCase(check[i]);
				}
			}

			System.out.println(check);

		} finally {
			sc.close();
		}

	}

}