import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		// split??§????????????????´?
		String[] strArray = str.split("");
		//String[] strArray = new String[str.length()]; 
		
		for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		}
		System.out.println();
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		// split??§????????????????´?
		String[] strArray = str.split("");
		//String[] strArray = new String[str.length()]; 
		
		for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		}
		System.out.println();
	}
} Main public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		// split??§????????????????´?
		String[] strArray = str.split("");
		//String[] strArray = new String[str.length()]; 
		
		for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		}
		System.out.println();
	} main {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		// split??§????????????????´?
		String[] strArray = str.split("");
		//String[] strArray = new String[str.length()]; 
		
		for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		}
		System.out.println();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc String[] strArray = str.split(""); strArray str.split("") str.split str "" for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		} int i = 0; int i = 0; i 0 i < strArray.length i strArray.length strArray strArray.length i++ i++ i {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		} {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		} if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			} Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			} strArray[i] = strArray[i].toLowerCase() strArray[i] strArray i strArray[i].toLowerCase() strArray[i].toLowerCase strArray[i] strArray i {
				strArray[i] = strArray[i].toUpperCase();
			} strArray[i] = strArray[i].toUpperCase() strArray[i] strArray i strArray[i].toUpperCase() strArray[i].toUpperCase strArray[i] strArray i System.out.print(strArray[i]) System.out.print System.out System System.out strArray[i] strArray i System.out.println() System.out.println System.out System System.out String[] args args public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		// split??§????????????????´?
		String[] strArray = str.split("");
		//String[] strArray = new String[str.length()]; 
		
		for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		}
		System.out.println();
	}
} public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		// split??§????????????????´?
		String[] strArray = str.split("");
		//String[] strArray = new String[str.length()]; 
		
		for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		}
		System.out.println();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		String str = sc.nextLine();
		// split??§????????????????´?
		String[] strArray = str.split("");
		//String[] strArray = new String[str.length()]; 
		
		for (int i = 0; i < strArray.length; i++) {
			if(Character.isUpperCase(str.charAt(i))){
				//??§???????????¨???
				strArray[i] = strArray[i].toLowerCase();
			}else{
				strArray[i] = strArray[i].toUpperCase();
			}
		    System.out.print(strArray[i]);
		}
		System.out.println();
	}
}