import static java.lang.Character.*;

import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
				for(int i=0; i<str.length(); i++){
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				}
				System.out.print("\n");
	}

} import static java.lang.Character.*; import static java.lang.Character.*; import static java.lang.Character.*; import java.util.Scanner; Scanner java.util class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
				for(int i=0; i<str.length(); i++){
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				}
				System.out.print("\n");
	}

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

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
				for(int i=0; i<str.length(); i++){
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				}
				System.out.print("\n");
	} main {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
				for(int i=0; i<str.length(); i++){
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				}
				System.out.print("\n");
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan for(int i=0; i<str.length(); i++){
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				} {
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				} char ch = str.charAt(i); ch str.charAt(i) str.charAt str i if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					} isLowerCase(ch) == true isLowerCase(ch) isLowerCase ch true {
						ch = toUpperCase(ch);
					} ch = toUpperCase(ch) ch toUpperCase(ch) toUpperCase ch {
						ch = toLowerCase(ch);
					} ch = toLowerCase(ch) ch toLowerCase(ch) toLowerCase ch System.out.print(ch) System.out.print System.out System System.out ch System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args
import static java.lang.Character.*;

import java.util.Scanner;

class Main {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		String str = scan.nextLine();
				for(int i=0; i<str.length(); i++){
					char ch = str.charAt(i);
					if(isLowerCase(ch) == true){
						ch = toUpperCase(ch);
					}else{
						ch = toLowerCase(ch);
					}
					System.out.print(ch);
				}
				System.out.print("\n");
	}

}