import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		
		String changeLine = "";
		for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		}
		
		System.out.println(changeLine);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		
		String changeLine = "";
		for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		}
		
		System.out.println(changeLine);
	}

} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		
		String changeLine = "";
		for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		}
		
		System.out.println(changeLine);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		
		String changeLine = "";
		for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		}
		
		System.out.println(changeLine);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br String changeLine = ""; changeLine "" for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		} int i = 0; int i = 0; i 0 i<line.length() i line.length() line.length line i++ i++ i {
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		} {
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		} if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			} Character.isUpperCase(line.charAt(i)) Character.isUpperCase Character line.charAt(i) line.charAt line i {
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			} changeLine += String.valueOf(Character.toLowerCase(line.charAt(i))) changeLine String.valueOf(Character.toLowerCase(line.charAt(i))) String.valueOf String Character.toLowerCase(line.charAt(i)) Character.toLowerCase Character line.charAt(i) line.charAt line i if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			} Character.isLowerCase(line.charAt(i)) Character.isLowerCase Character line.charAt(i) line.charAt line i {
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			} changeLine += String.valueOf(Character.toUpperCase(line.charAt(i))) changeLine String.valueOf(Character.toUpperCase(line.charAt(i))) String.valueOf String Character.toUpperCase(line.charAt(i)) Character.toUpperCase Character line.charAt(i) line.charAt line i {
				changeLine += String.valueOf(line.charAt(i));
			} changeLine += String.valueOf(line.charAt(i)) changeLine String.valueOf(line.charAt(i)) String.valueOf String line.charAt(i) line.charAt line i System.out.println(changeLine) System.out.println System.out System System.out changeLine String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		
		String changeLine = "";
		for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		}
		
		System.out.println(changeLine);
	}

} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		
		String changeLine = "";
		for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		}
		
		System.out.println(changeLine);
	}

} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		
		String changeLine = "";
		for(int i = 0;i<line.length();i++){
			if(Character.isUpperCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toLowerCase(line.charAt(i)));
			}
			else if(Character.isLowerCase(line.charAt(i))){
				changeLine += String.valueOf(Character.toUpperCase(line.charAt(i)));
			}
			else{
				changeLine += String.valueOf(line.charAt(i));
			}
		}
		
		System.out.println(changeLine);
	}

}