import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException {
		Scanner stdIn = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		char[] B = A.toCharArray();
		
		
		for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		}
		
		A = new String(B);
		
		System.out.println(A);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException {
		Scanner stdIn = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		char[] B = A.toCharArray();
		
		
		for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		}
		
		A = new String(B);
		
		System.out.println(A);
	}
} Main public static void main(String[] args) throws IOException {
		Scanner stdIn = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		char[] B = A.toCharArray();
		
		
		for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		}
		
		A = new String(B);
		
		System.out.println(A);
	} main {
		Scanner stdIn = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		char[] B = A.toCharArray();
		
		
		for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		}
		
		A = new String(B);
		
		System.out.println(A);
	} Scanner stdIn = new Scanner(System.in); stdIn new Scanner(System.in) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String A = br.readLine(); A br.readLine() br.readLine br char[] B = A.toCharArray(); B A.toCharArray() A.toCharArray A for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		} int i = 0; int i = 0; i 0 i < B.length i B.length B B.length i++ i++ i {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		} {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		} if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			} Character.isLowerCase(B[i]) Character.isLowerCase Character B[i] B i {
				B[i] = Character.toUpperCase(B[i]);
			} B[i] = Character.toUpperCase(B[i]) B[i] B i Character.toUpperCase(B[i]) Character.toUpperCase Character B[i] B i if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			} Character.isUpperCase(B[i]) Character.isUpperCase Character B[i] B i {
				B[i] = Character.toLowerCase(B[i]);
			} B[i] = Character.toLowerCase(B[i]) B[i] B i Character.toLowerCase(B[i]) Character.toLowerCase Character B[i] B i A = new String(B) A new String(B) System.out.println(A) System.out.println System.out System System.out A String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		Scanner stdIn = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		char[] B = A.toCharArray();
		
		
		for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		}
		
		A = new String(B);
		
		System.out.println(A);
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		Scanner stdIn = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		char[] B = A.toCharArray();
		
		
		for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		}
		
		A = new String(B);
		
		System.out.println(A);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException {
		Scanner stdIn = new Scanner(System.in);
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String A = br.readLine();
		char[] B = A.toCharArray();
		
		
		for(int i = 0; i < B.length; i++) {
			if(Character.isLowerCase(B[i])) {
				B[i] = Character.toUpperCase(B[i]);
			}
			else if (Character.isUpperCase(B[i])) {
				B[i] = Character.toLowerCase(B[i]);
			}
		}
		
		A = new String(B);
		
		System.out.println(A);
	}
}