import java.util.Scanner;

/**
 * @author kawakami
 *
 */
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		String str,copy,dam;
		String chg = "";
		
		str = as.nextLine();
		char line[];
		char hika[];
		line = new char[str.length()];
		hika = new char[str.length()];
		
		copy = str;
		copy = copy.toLowerCase();
		
		for(int i=0;i<str.length();i++){
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		}
		
		for(int i=0;i<str.length();i++){
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		}
		
		System.out.println(chg);

	}

} import java.util.Scanner; Scanner java.util class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		String str,copy,dam;
		String chg = "";
		
		str = as.nextLine();
		char line[];
		char hika[];
		line = new char[str.length()];
		hika = new char[str.length()];
		
		copy = str;
		copy = copy.toLowerCase();
		
		for(int i=0;i<str.length();i++){
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		}
		
		for(int i=0;i<str.length();i++){
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		}
		
		System.out.println(chg);

	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		String str,copy,dam;
		String chg = "";
		
		str = as.nextLine();
		char line[];
		char hika[];
		line = new char[str.length()];
		hika = new char[str.length()];
		
		copy = str;
		copy = copy.toLowerCase();
		
		for(int i=0;i<str.length();i++){
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		}
		
		for(int i=0;i<str.length();i++){
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		}
		
		System.out.println(chg);

	} main {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		String str,copy,dam;
		String chg = "";
		
		str = as.nextLine();
		char line[];
		char hika[];
		line = new char[str.length()];
		hika = new char[str.length()];
		
		copy = str;
		copy = copy.toLowerCase();
		
		for(int i=0;i<str.length();i++){
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		}
		
		for(int i=0;i<str.length();i++){
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		}
		
		System.out.println(chg);

	} Scanner as = new Scanner(System.in); as new Scanner(System.in) String str str copy copy dam; dam String chg = ""; chg "" str = as.nextLine() str as.nextLine() as.nextLine as char line[]; line char hika[]; hika line = new char[str.length()] line new char[str.length()] str.length() str.length str hika = new char[str.length()] hika new char[str.length()] str.length() str.length str copy = str copy str copy = copy.toLowerCase() copy copy.toLowerCase() copy.toLowerCase copy for(int i=0;i<str.length();i++){
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		} {
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		} line[i] = str.charAt(i) line[i] line i str.charAt(i) str.charAt str i hika[i] = copy.charAt(i) hika[i] hika i copy.charAt(i) copy.charAt copy i for(int i=0;i<str.length();i++){
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		} {
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		} if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			} line[i] != hika[i] line[i] line i hika[i] hika i {
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			} dam = String.valueOf(line[i]) dam String.valueOf(line[i]) String.valueOf String line[i] line i dam = dam.toLowerCase() dam dam.toLowerCase() dam.toLowerCase dam chg = chg + dam chg chg + dam chg dam {
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			} dam = String.valueOf(line[i]) dam String.valueOf(line[i]) String.valueOf String line[i] line i dam = dam.toUpperCase() dam dam.toUpperCase() dam.toUpperCase dam chg = chg + dam chg chg + dam chg dam System.out.println(chg) System.out.println System.out System System.out chg String[] args args
import java.util.Scanner;

/**
 * @author kawakami
 *
 */
class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner as = new Scanner(System.in);
		
		String str,copy,dam;
		String chg = "";
		
		str = as.nextLine();
		char line[];
		char hika[];
		line = new char[str.length()];
		hika = new char[str.length()];
		
		copy = str;
		copy = copy.toLowerCase();
		
		for(int i=0;i<str.length();i++){
			
			line[i] = str.charAt(i);
			hika[i] = copy.charAt(i);
			
			
		}
		
		for(int i=0;i<str.length();i++){
			
			if(line[i] != hika[i]){
				
				dam = String.valueOf(line[i]);
				dam = dam.toLowerCase();
				chg = chg + dam;
				
			}
			else{
				
				dam = String.valueOf(line[i]);
				dam = dam.toUpperCase();
				chg = chg + dam;
				
			}
			
			
			
		}
		
		System.out.println(chg);

	}

}