import java.util.Scanner;

class Main {

	public static void main(String[] args) {

	char[] inputline;
	Scanner stdIn = new Scanner(System.in);

	inputline =  stdIn.nextLine().toCharArray();

	for(int i = 0; i < inputline.length; i++) {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	}

	System.out.println(inputline);

	stdIn.close();
	}
} import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

	char[] inputline;
	Scanner stdIn = new Scanner(System.in);

	inputline =  stdIn.nextLine().toCharArray();

	for(int i = 0; i < inputline.length; i++) {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	}

	System.out.println(inputline);

	stdIn.close();
	}
} Main public static void main(String[] args) {

	char[] inputline;
	Scanner stdIn = new Scanner(System.in);

	inputline =  stdIn.nextLine().toCharArray();

	for(int i = 0; i < inputline.length; i++) {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	}

	System.out.println(inputline);

	stdIn.close();
	} main {

	char[] inputline;
	Scanner stdIn = new Scanner(System.in);

	inputline =  stdIn.nextLine().toCharArray();

	for(int i = 0; i < inputline.length; i++) {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	}

	System.out.println(inputline);

	stdIn.close();
	} char[] inputline; inputline Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) inputline =  stdIn.nextLine().toCharArray() inputline stdIn.nextLine().toCharArray() stdIn.nextLine().toCharArray stdIn.nextLine() stdIn.nextLine stdIn for(int i = 0; i < inputline.length; i++) {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	} int i = 0; int i = 0; i 0 i < inputline.length i inputline.length inputline inputline.length i++ i++ i {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	} {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	} if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		} Character.isLowerCase(inputline[i]) Character.isLowerCase Character inputline[i] inputline i {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} inputline[i] = Character.toUpperCase(inputline[i]) inputline[i] inputline i Character.toUpperCase(inputline[i]) Character.toUpperCase Character inputline[i] inputline i {
			inputline[i] = Character.toLowerCase(inputline[i]);
		} inputline[i] = Character.toLowerCase(inputline[i]) inputline[i] inputline i Character.toLowerCase(inputline[i]) Character.toLowerCase Character inputline[i] inputline i System.out.println(inputline) System.out.println System.out System System.out inputline stdIn.close() stdIn.close stdIn String[] args args
import java.util.Scanner;

class Main {

	public static void main(String[] args) {

	char[] inputline;
	Scanner stdIn = new Scanner(System.in);

	inputline =  stdIn.nextLine().toCharArray();

	for(int i = 0; i < inputline.length; i++) {
		if(Character.isLowerCase(inputline[i])) {
			inputline[i] = Character.toUpperCase(inputline[i]);
		} else {
			inputline[i] = Character.toLowerCase(inputline[i]);
		}
	}

	System.out.println(inputline);

	stdIn.close();
	}
}