import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		char[] line = string.toCharArray();

		char c = ' ';
		for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		}
System.out.println();

	}

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

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		char[] line = string.toCharArray();

		char c = ' ';
		for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		}
System.out.println();

	}

} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		char[] line = string.toCharArray();

		char c = ' ';
		for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		}
System.out.println();

	} main {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		char[] line = string.toCharArray();

		char c = ' ';
		for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		}
System.out.println();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String string = sc.nextLine(); string sc.nextLine() sc.nextLine sc char[] line = string.toCharArray(); line string.toCharArray() string.toCharArray string char c = ' '; c ' ' for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		} int i = 0; int i = 0; i 0 i < line.length i line.length line line.length i++ i++ i {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		} {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		} if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			} Character.isUpperCase(line[i]) Character.isUpperCase Character line[i] line i {
				c = Character.toLowerCase(line[i]);
			} c = Character.toLowerCase(line[i]) c Character.toLowerCase(line[i]) Character.toLowerCase Character line[i] line i if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			} Character.isLowerCase(line[i]) Character.isLowerCase Character line[i] line i {
				c = Character.toUpperCase(line[i]);
			} c = Character.toUpperCase(line[i]) c Character.toUpperCase(line[i]) Character.toUpperCase Character line[i] line i {
				c = line[i];
			} c = line[i] c line[i] line i 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) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		char[] line = string.toCharArray();

		char c = ' ';
		for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		}
System.out.println();

	}

} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		char[] line = string.toCharArray();

		char c = ' ';
		for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		}
System.out.println();

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String string = sc.nextLine();
		char[] line = string.toCharArray();

		char c = ' ';
		for (int i = 0; i < line.length; i++) {
			if (Character.isUpperCase(line[i])) {
				c = Character.toLowerCase(line[i]);
			}
			else if (Character.isLowerCase(line[i])) {
				c = Character.toUpperCase(line[i]);
			} else {
				c = line[i];
			}
			System.out.print(c);
		}
System.out.println();

	}

}