import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String sep = System.getProperty("line.separator");
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(sep);
		String str = sc.next();
		char[] charArray = str.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		}
		for (char ch : charArray) {
			System.out.print(ch);
		}
		System.out.println();

	}

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

	public static void main(String[] args) {
		String sep = System.getProperty("line.separator");
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(sep);
		String str = sc.next();
		char[] charArray = str.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		}
		for (char ch : charArray) {
			System.out.print(ch);
		}
		System.out.println();

	}

} Main public static void main(String[] args) {
		String sep = System.getProperty("line.separator");
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(sep);
		String str = sc.next();
		char[] charArray = str.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		}
		for (char ch : charArray) {
			System.out.print(ch);
		}
		System.out.println();

	} main {
		String sep = System.getProperty("line.separator");
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(sep);
		String str = sc.next();
		char[] charArray = str.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		}
		for (char ch : charArray) {
			System.out.print(ch);
		}
		System.out.println();

	} String sep = System.getProperty("line.separator"); sep System.getProperty("line.separator") System.getProperty System "line.separator" Scanner sc = new Scanner(System.in); sc new Scanner(System.in) sc.useDelimiter(sep) sc.useDelimiter sc sep String str = sc.next(); str sc.next() sc.next sc char[] charArray = str.toCharArray(); charArray str.toCharArray() str.toCharArray str for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		} int i = 0; int i = 0; i 0 i < charArray.length i charArray.length charArray charArray.length i++ i++ i {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		} {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		} if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			} Character.isUpperCase(charArray[i]) Character.isUpperCase Character charArray[i] charArray i {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} charArray[i] = Character.toLowerCase(charArray[i]) charArray[i] charArray i Character.toLowerCase(charArray[i]) Character.toLowerCase Character charArray[i] charArray i {
				charArray[i] = Character.toUpperCase(charArray[i]);
			} charArray[i] = Character.toUpperCase(charArray[i]) charArray[i] charArray i Character.toUpperCase(charArray[i]) Character.toUpperCase Character charArray[i] charArray i for (char ch : charArray) {
			System.out.print(ch);
		} char ch charArray {
			System.out.print(ch);
		} {
			System.out.print(ch);
		} System.out.print(ch) System.out.print System.out System System.out ch System.out.println() System.out.println System.out System System.out String[] args args public class Main {

	public static void main(String[] args) {
		String sep = System.getProperty("line.separator");
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(sep);
		String str = sc.next();
		char[] charArray = str.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		}
		for (char ch : charArray) {
			System.out.print(ch);
		}
		System.out.println();

	}

} public class Main {

	public static void main(String[] args) {
		String sep = System.getProperty("line.separator");
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(sep);
		String str = sc.next();
		char[] charArray = str.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		}
		for (char ch : charArray) {
			System.out.print(ch);
		}
		System.out.println();

	}

} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		String sep = System.getProperty("line.separator");
		Scanner sc = new Scanner(System.in);
		sc.useDelimiter(sep);
		String str = sc.next();
		char[] charArray = str.toCharArray();
		for (int i = 0; i < charArray.length; i++) {
			if (Character.isUpperCase(charArray[i])) {
				charArray[i] = Character.toLowerCase(charArray[i]);
			} else {
				charArray[i] = Character.toUpperCase(charArray[i]);
			}
		}
		for (char ch : charArray) {
			System.out.print(ch);
		}
		System.out.println();

	}

}