import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		}
		System.out.println();
		scanner.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		}
		System.out.println();
		scanner.close();
	}
} Main public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		}
		System.out.println();
		scanner.close();
	} main {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		}
		System.out.println();
		scanner.close();
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String string = scanner.nextLine(); string scanner.nextLine() scanner.nextLine scanner for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		} int i=0; int i=0; i 0 i<string.length() i string.length() string.length string i++ i++ i {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		} {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		} char temp = string.charAt(i); temp string.charAt(i) string.charAt string i if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			} 'a'<=temp&&temp<='z' 'a'<=temp 'a' temp temp<='z' temp 'z' {
				System.out.print((char)(temp-32));
			} System.out.print((char)(temp-32)) System.out.print System.out System System.out (char)(temp-32) temp 32 if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			} 'A'<=temp&temp<='Z' 'A'<=temp 'A' temp temp<='Z' temp 'Z' {
				System.out.print((char)(temp+32));
			} System.out.print((char)(temp+32)) System.out.print System.out System System.out (char)(temp+32) temp 32 {
				System.out.print(temp);
			} System.out.print(temp) System.out.print System.out System System.out temp System.out.println() System.out.println System.out System System.out scanner.close() scanner.close scanner String[] args args public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		}
		System.out.println();
		scanner.close();
	}
} public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		}
		System.out.println();
		scanner.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner = new Scanner(System.in);
		String string = scanner.nextLine();
		for(int i=0;i<string.length();i++) {
			char temp = string.charAt(i);
			if('a'<=temp&&temp<='z') {
				System.out.print((char)(temp-32));
			}else if('A'<=temp&temp<='Z') {
				System.out.print((char)(temp+32));
			}else {
				System.out.print(temp);
			}
		}
		System.out.println();
		scanner.close();
	}
}
