
import java.util.Scanner;

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

		Scanner stdIn = new Scanner(System.in);

		// ?????????????????????????????????
		stdIn.useDelimiter("\r");

		String word = stdIn.next();

		// ??????????????????????????§?°??????????
		// String?????????char????????????????????????????????????????????????

		char[] cw = word.toCharArray();
		for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		}
		for (char charValue : cw) {
			System.out.print(charValue);
		}
		stdIn.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {

		Scanner stdIn = new Scanner(System.in);

		// ?????????????????????????????????
		stdIn.useDelimiter("\r");

		String word = stdIn.next();

		// ??????????????????????????§?°??????????
		// String?????????char????????????????????????????????????????????????

		char[] cw = word.toCharArray();
		for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		}
		for (char charValue : cw) {
			System.out.print(charValue);
		}
		stdIn.close();
	}
} Main public static void main(String[] args) {

		Scanner stdIn = new Scanner(System.in);

		// ?????????????????????????????????
		stdIn.useDelimiter("\r");

		String word = stdIn.next();

		// ??????????????????????????§?°??????????
		// String?????????char????????????????????????????????????????????????

		char[] cw = word.toCharArray();
		for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		}
		for (char charValue : cw) {
			System.out.print(charValue);
		}
		stdIn.close();
	} main {

		Scanner stdIn = new Scanner(System.in);

		// ?????????????????????????????????
		stdIn.useDelimiter("\r");

		String word = stdIn.next();

		// ??????????????????????????§?°??????????
		// String?????????char????????????????????????????????????????????????

		char[] cw = word.toCharArray();
		for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		}
		for (char charValue : cw) {
			System.out.print(charValue);
		}
		stdIn.close();
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) stdIn.useDelimiter("\r") stdIn.useDelimiter stdIn "\r" String word = stdIn.next(); word stdIn.next() stdIn.next stdIn char[] cw = word.toCharArray(); cw word.toCharArray() word.toCharArray word for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		} int i = 0; int i = 0; i 0 i < cw.length && cw.length < 1200 i < cw.length i cw.length cw cw.length cw.length < 1200 cw.length cw cw.length 1200 i++ i++ i {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		} {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		} if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			} Character.isUpperCase(cw[i]) Character.isUpperCase Character cw[i] cw i {
				cw[i] = Character.toLowerCase(cw[i]);
			} cw[i] = Character.toLowerCase(cw[i]) cw[i] cw i Character.toLowerCase(cw[i]) Character.toLowerCase Character cw[i] cw i {
				cw[i] = Character.toUpperCase(cw[i]);
			} cw[i] = Character.toUpperCase(cw[i]) cw[i] cw i Character.toUpperCase(cw[i]) Character.toUpperCase Character cw[i] cw i for (char charValue : cw) {
			System.out.print(charValue);
		} char charValue cw {
			System.out.print(charValue);
		} {
			System.out.print(charValue);
		} System.out.print(charValue) System.out.print System.out System System.out charValue stdIn.close() stdIn.close stdIn String[] args args public class Main {
	public static void main(String[] args) {

		Scanner stdIn = new Scanner(System.in);

		// ?????????????????????????????????
		stdIn.useDelimiter("\r");

		String word = stdIn.next();

		// ??????????????????????????§?°??????????
		// String?????????char????????????????????????????????????????????????

		char[] cw = word.toCharArray();
		for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		}
		for (char charValue : cw) {
			System.out.print(charValue);
		}
		stdIn.close();
	}
} public class Main {
	public static void main(String[] args) {

		Scanner stdIn = new Scanner(System.in);

		// ?????????????????????????????????
		stdIn.useDelimiter("\r");

		String word = stdIn.next();

		// ??????????????????????????§?°??????????
		// String?????????char????????????????????????????????????????????????

		char[] cw = word.toCharArray();
		for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		}
		for (char charValue : cw) {
			System.out.print(charValue);
		}
		stdIn.close();
	}
} Main

import java.util.Scanner;

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

		Scanner stdIn = new Scanner(System.in);

		// ?????????????????????????????????
		stdIn.useDelimiter("\r");

		String word = stdIn.next();

		// ??????????????????????????§?°??????????
		// String?????????char????????????????????????????????????????????????

		char[] cw = word.toCharArray();
		for (int i = 0; i < cw.length && cw.length < 1200; i++) {
			if (Character.isUpperCase(cw[i])) {
				cw[i] = Character.toLowerCase(cw[i]);
			} else {
				cw[i] = Character.toUpperCase(cw[i]);
			}
		}
		for (char charValue : cw) {
			System.out.print(charValue);
		}
		stdIn.close();
	}
}