import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] sen = input.toCharArray();

		for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		}
		String output = String.valueOf(sen);
		System.out.println(output);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] sen = input.toCharArray();

		for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		}
		String output = String.valueOf(sen);
		System.out.println(output);
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] sen = input.toCharArray();

		for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		}
		String output = String.valueOf(sen);
		System.out.println(output);
	} main {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] sen = input.toCharArray();

		for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		}
		String output = String.valueOf(sen);
		System.out.println(output);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc char[] sen = input.toCharArray(); sen input.toCharArray() input.toCharArray input for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		} int i = 0; int i = 0; i 0 i < sen.length i sen.length sen sen.length i++ i++ i {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		} {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		} if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			} Character.isUpperCase(sen[i]) Character.isUpperCase Character sen[i] sen i {
				sen[i] = Character.toLowerCase(sen[i]);
			} sen[i] = Character.toLowerCase(sen[i]) sen[i] sen i Character.toLowerCase(sen[i]) Character.toLowerCase Character sen[i] sen i {
				sen[i] = Character.toUpperCase(sen[i]);
			} sen[i] = Character.toUpperCase(sen[i]) sen[i] sen i Character.toUpperCase(sen[i]) Character.toUpperCase Character sen[i] sen i String output = String.valueOf(sen); output String.valueOf(sen) String.valueOf String sen System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] sen = input.toCharArray();

		for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		}
		String output = String.valueOf(sen);
		System.out.println(output);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] sen = input.toCharArray();

		for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		}
		String output = String.valueOf(sen);
		System.out.println(output);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] sen = input.toCharArray();

		for (int i = 0; i < sen.length; i++) {
			if (Character.isUpperCase(sen[i])) {
				sen[i] = Character.toLowerCase(sen[i]);
			} else {
				sen[i] = Character.toUpperCase(sen[i]);
			}
		}
		String output = String.valueOf(sen);
		System.out.println(output);
	}
}
