import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] input = br.readLine().toCharArray();
		StringBuffer sb = new StringBuffer();

		for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		}
		System.out.println(sb.toString());

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] input = br.readLine().toCharArray();
		StringBuffer sb = new StringBuffer();

		for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		}
		System.out.println(sb.toString());

	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] input = br.readLine().toCharArray();
		StringBuffer sb = new StringBuffer();

		for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		}
		System.out.println(sb.toString());

	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] input = br.readLine().toCharArray();
		StringBuffer sb = new StringBuffer();

		for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		}
		System.out.println(sb.toString());

	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] input = br.readLine().toCharArray(); input br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br StringBuffer sb = new StringBuffer(); sb new StringBuffer() for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		} int i = 0; int i = 0; i 0 i < input.length i input.length input input.length i++ i++ i {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		} {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		} char target = input[i]; target input[i] input i if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			} Character.isUpperCase(target) Character.isUpperCase Character target {
				sb.append(String.valueOf(target).toLowerCase());
			} sb.append(String.valueOf(target).toLowerCase()) sb.append sb String.valueOf(target).toLowerCase() String.valueOf(target).toLowerCase String.valueOf(target) String.valueOf String target if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			} Character.isLowerCase(target) Character.isLowerCase Character target {
				sb.append(String.valueOf(target).toUpperCase());
			} sb.append(String.valueOf(target).toUpperCase()) sb.append sb String.valueOf(target).toUpperCase() String.valueOf(target).toUpperCase String.valueOf(target) String.valueOf String target {
				sb.append(String.valueOf(target));
			} sb.append(String.valueOf(target)) sb.append sb String.valueOf(target) String.valueOf String target System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] input = br.readLine().toCharArray();
		StringBuffer sb = new StringBuffer();

		for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		}
		System.out.println(sb.toString());

	}
} public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] input = br.readLine().toCharArray();
		StringBuffer sb = new StringBuffer();

		for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		}
		System.out.println(sb.toString());

	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		char[] input = br.readLine().toCharArray();
		StringBuffer sb = new StringBuffer();

		for (int i = 0; i < input.length; i++) {
			char target = input[i];
			if (Character.isUpperCase(target)) {
				sb.append(String.valueOf(target).toLowerCase());
			} else if (Character.isLowerCase(target)) {
				sb.append(String.valueOf(target).toUpperCase());
			} else {
				sb.append(String.valueOf(target));
			}
		}
		System.out.println(sb.toString());

	}
}