public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
		String str = scan.nextLine();
		for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		}
		System.out.println();
	}

} public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
		String str = scan.nextLine();
		for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		}
		System.out.println();
	}

} Main public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
		String str = scan.nextLine();
		for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		}
		System.out.println();
	} main {
		java.util.Scanner scan = new java.util.Scanner(System.in);
		String str = scan.nextLine();
		for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		}
		System.out.println();
	} java.util.Scanner scan = new java.util.Scanner(System.in); scan new java.util.Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		} int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		} {
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		} char arr = str.charAt(i); arr str.charAt(i) str.charAt str i if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				} Character.isLowerCase(arr) Character.isLowerCase Character arr {
				System.out.print(Character.toUpperCase(arr));
				} System.out.print(Character.toUpperCase(arr)) System.out.print System.out System System.out Character.toUpperCase(arr) Character.toUpperCase Character arr {
					System.out.print(Character.toLowerCase(arr));
				} System.out.print(Character.toLowerCase(arr)) System.out.print System.out System System.out Character.toLowerCase(arr) Character.toLowerCase Character arr System.out.println() System.out.println System.out System System.out String[] args args public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
		String str = scan.nextLine();
		for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		}
		System.out.println();
	}

} public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
		String str = scan.nextLine();
		for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		}
		System.out.println();
	}

} Main
public class Main {
	public static void main(String[] args){
		java.util.Scanner scan = new java.util.Scanner(System.in);
		String str = scan.nextLine();
		for(int i = 0; i < str.length();i++){
			char arr = str.charAt(i);
			if(Character.isLowerCase(arr)){
				System.out.print(Character.toUpperCase(arr));
				}else{
					System.out.print(Character.toLowerCase(arr));
				}
		}
		System.out.println();
	}

}