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 str;
		int strSize = 0;
		str = br.readLine();
		StringBuilder sb = new StringBuilder(str);
		strSize = str.length();
		for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		}
		System.out.println(sb);
	}
} 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 str;
		int strSize = 0;
		str = br.readLine();
		StringBuilder sb = new StringBuilder(str);
		strSize = str.length();
		for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		}
		System.out.println(sb);
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int strSize = 0;
		str = br.readLine();
		StringBuilder sb = new StringBuilder(str);
		strSize = str.length();
		for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		}
		System.out.println(sb);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int strSize = 0;
		str = br.readLine();
		StringBuilder sb = new StringBuilder(str);
		strSize = str.length();
		for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		}
		System.out.println(sb);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str int strSize = 0; strSize 0 str = br.readLine() str br.readLine() br.readLine br StringBuilder sb = new StringBuilder(str); sb new StringBuilder(str) strSize = str.length() strSize str.length() str.length str for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		} int i = 0; int i = 0; i 0 i < strSize i strSize ++i ++i i {
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		} {
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		} char judge = sb.charAt(i); judge sb.charAt(i) sb.charAt sb i if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			} Character.isLowerCase(judge) Character.isLowerCase Character judge {
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			} char tmp = Character.toUpperCase(judge); tmp Character.toUpperCase(judge) Character.toUpperCase Character judge sb.setCharAt(i, tmp) sb.setCharAt sb i tmp if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			} Character.isUpperCase(judge) Character.isUpperCase Character judge {
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			} char tmp = Character.toLowerCase(judge); tmp Character.toLowerCase(judge) Character.toLowerCase Character judge sb.setCharAt(i, tmp) sb.setCharAt sb i tmp System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int strSize = 0;
		str = br.readLine();
		StringBuilder sb = new StringBuilder(str);
		strSize = str.length();
		for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		}
		System.out.println(sb);
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		int strSize = 0;
		str = br.readLine();
		StringBuilder sb = new StringBuilder(str);
		strSize = str.length();
		for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		}
		System.out.println(sb);
	}
} 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 str;
		int strSize = 0;
		str = br.readLine();
		StringBuilder sb = new StringBuilder(str);
		strSize = str.length();
		for(int i = 0; i < strSize; ++i){
			char judge = sb.charAt(i);
			if(Character.isLowerCase(judge)){
				char tmp = Character.toUpperCase(judge);
				sb.setCharAt(i, tmp);
			}
			else if(Character.isUpperCase(judge)){
				char tmp = Character.toLowerCase(judge);
				sb.setCharAt(i, tmp);
			}
		}
		System.out.println(sb);
	}
}