import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String text = input();

		char[] arrays = text.toCharArray();

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

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		}
		System.out.println(arrays);

		close();

	}

	public static String input() {

		return scanner.nextLine();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

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

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String text = input();

		char[] arrays = text.toCharArray();

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

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		}
		System.out.println(arrays);

		close();

	}

	public static String input() {

		return scanner.nextLine();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main public static Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) public static void main(String[] args) {

		String text = input();

		char[] arrays = text.toCharArray();

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

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		}
		System.out.println(arrays);

		close();

	} main {

		String text = input();

		char[] arrays = text.toCharArray();

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

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		}
		System.out.println(arrays);

		close();

	} String text = input(); text input() input char[] arrays = text.toCharArray(); arrays text.toCharArray() text.toCharArray text for (int i = 0; i < text.length(); i++) {

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		} int i = 0; int i = 0; i 0 i < text.length() i text.length() text.length text i++ i++ i {

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		} {

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

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

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

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

				arrays[i] = Character.toLowerCase(arrays[i]);

			} arrays[i] = Character.toLowerCase(arrays[i]) arrays[i] arrays i Character.toLowerCase(arrays[i]) Character.toLowerCase Character arrays[i] arrays i {

				arrays[i] = Character.toUpperCase(arrays[i]);

			} arrays[i] = Character.toUpperCase(arrays[i]) arrays[i] arrays i Character.toUpperCase(arrays[i]) Character.toUpperCase Character arrays[i] arrays i System.out.println(arrays) System.out.println System.out System System.out arrays close() close String[] args args public static String input() {

		return scanner.nextLine();

	} input {

		return scanner.nextLine();

	} return scanner.nextLine(); scanner.nextLine() scanner.nextLine scanner public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	} close {

		if (scanner != null) {

			scanner.close();

		}
	} if (scanner != null) {

			scanner.close();

		} scanner != null scanner null {

			scanner.close();

		} scanner.close() scanner.close scanner public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String text = input();

		char[] arrays = text.toCharArray();

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

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		}
		System.out.println(arrays);

		close();

	}

	public static String input() {

		return scanner.nextLine();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String text = input();

		char[] arrays = text.toCharArray();

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

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		}
		System.out.println(arrays);

		close();

	}

	public static String input() {

		return scanner.nextLine();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static Scanner scanner = new Scanner(System.in);

	public static void main(String[] args) {

		String text = input();

		char[] arrays = text.toCharArray();

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

			if (Character.isUpperCase(arrays[i])) {

				arrays[i] = Character.toLowerCase(arrays[i]);

			} else {

				arrays[i] = Character.toUpperCase(arrays[i]);

			}
		}
		System.out.println(arrays);

		close();

	}

	public static String input() {

		return scanner.nextLine();

	}

	public static void close() {

		if (scanner != null) {

			scanner.close();

		}
	}
}