

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));
		// input
		String tempStr= br.readLine();//clear

		// Constraints

	/*	for (int i = 0; i < tempStr.length(); i++){
			String str;
			if(tempStr.charAt(i) >= 'a' && tempStr.charAt(i) <= 'z') {
				str = Character.toString(tempStr.charAt(i));
				str = tempStr.toUpperCase();
				System.out.print(str);
			}else{
				str = Character.toString(tempStr.charAt(i));
				str = str.toLowerCase();
				System.out.print(str);
			}
		}*/

		// output
		/*for (int i = 0; i < tempStr.length(); i++) {
			System.out.print(tempStr);
		}*/
		for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		}
		System.out.println();
	}
} 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));
		// input
		String tempStr= br.readLine();//clear

		// Constraints

	/*	for (int i = 0; i < tempStr.length(); i++){
			String str;
			if(tempStr.charAt(i) >= 'a' && tempStr.charAt(i) <= 'z') {
				str = Character.toString(tempStr.charAt(i));
				str = tempStr.toUpperCase();
				System.out.print(str);
			}else{
				str = Character.toString(tempStr.charAt(i));
				str = str.toLowerCase();
				System.out.print(str);
			}
		}*/

		// output
		/*for (int i = 0; i < tempStr.length(); i++) {
			System.out.print(tempStr);
		}*/
		for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		}
		System.out.println();
	}
} Main public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// input
		String tempStr= br.readLine();//clear

		// Constraints

	/*	for (int i = 0; i < tempStr.length(); i++){
			String str;
			if(tempStr.charAt(i) >= 'a' && tempStr.charAt(i) <= 'z') {
				str = Character.toString(tempStr.charAt(i));
				str = tempStr.toUpperCase();
				System.out.print(str);
			}else{
				str = Character.toString(tempStr.charAt(i));
				str = str.toLowerCase();
				System.out.print(str);
			}
		}*/

		// output
		/*for (int i = 0; i < tempStr.length(); i++) {
			System.out.print(tempStr);
		}*/
		for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		}
		System.out.println();
	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// input
		String tempStr= br.readLine();//clear

		// Constraints

	/*	for (int i = 0; i < tempStr.length(); i++){
			String str;
			if(tempStr.charAt(i) >= 'a' && tempStr.charAt(i) <= 'z') {
				str = Character.toString(tempStr.charAt(i));
				str = tempStr.toUpperCase();
				System.out.print(str);
			}else{
				str = Character.toString(tempStr.charAt(i));
				str = str.toLowerCase();
				System.out.print(str);
			}
		}*/

		// output
		/*for (int i = 0; i < tempStr.length(); i++) {
			System.out.print(tempStr);
		}*/
		for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		}
		System.out.println();
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String tempStr= br.readLine(); tempStr br.readLine() br.readLine br for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		} int i= 0; int i= 0; i 0 i < tempStr.length() i tempStr.length() tempStr.length tempStr i++ i++ i {
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		} {
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		} if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i))); Character.isLowerCase(tempStr.charAt(i)) Character.isLowerCase Character tempStr.charAt(i) tempStr.charAt tempStr i System.out.print(Character.toUpperCase(tempStr.charAt(i))) System.out.print System.out System System.out Character.toUpperCase(tempStr.charAt(i)) Character.toUpperCase Character tempStr.charAt(i) tempStr.charAt tempStr i System.out.print(Character.toLowerCase(tempStr.charAt(i))) System.out.print System.out System System.out Character.toLowerCase(tempStr.charAt(i)) Character.toLowerCase Character tempStr.charAt(i) tempStr.charAt tempStr i System.out.println() System.out.println System.out System System.out String[] args args public class Main{


	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// input
		String tempStr= br.readLine();//clear

		// Constraints

	/*	for (int i = 0; i < tempStr.length(); i++){
			String str;
			if(tempStr.charAt(i) >= 'a' && tempStr.charAt(i) <= 'z') {
				str = Character.toString(tempStr.charAt(i));
				str = tempStr.toUpperCase();
				System.out.print(str);
			}else{
				str = Character.toString(tempStr.charAt(i));
				str = str.toLowerCase();
				System.out.print(str);
			}
		}*/

		// output
		/*for (int i = 0; i < tempStr.length(); i++) {
			System.out.print(tempStr);
		}*/
		for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		}
		System.out.println();
	}
} public class Main{


	public static void main(String[] args) throws IOException {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		// input
		String tempStr= br.readLine();//clear

		// Constraints

	/*	for (int i = 0; i < tempStr.length(); i++){
			String str;
			if(tempStr.charAt(i) >= 'a' && tempStr.charAt(i) <= 'z') {
				str = Character.toString(tempStr.charAt(i));
				str = tempStr.toUpperCase();
				System.out.print(str);
			}else{
				str = Character.toString(tempStr.charAt(i));
				str = str.toLowerCase();
				System.out.print(str);
			}
		}*/

		// output
		/*for (int i = 0; i < tempStr.length(); i++) {
			System.out.print(tempStr);
		}*/
		for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		}
		System.out.println();
	}
} 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));
		// input
		String tempStr= br.readLine();//clear

		// Constraints

	/*	for (int i = 0; i < tempStr.length(); i++){
			String str;
			if(tempStr.charAt(i) >= 'a' && tempStr.charAt(i) <= 'z') {
				str = Character.toString(tempStr.charAt(i));
				str = tempStr.toUpperCase();
				System.out.print(str);
			}else{
				str = Character.toString(tempStr.charAt(i));
				str = str.toLowerCase();
				System.out.print(str);
			}
		}*/

		// output
		/*for (int i = 0; i < tempStr.length(); i++) {
			System.out.print(tempStr);
		}*/
		for(int i= 0; i < tempStr.length(); i++){
			if(Character.isLowerCase(tempStr.charAt(i)))
				System.out.print(Character.toUpperCase(tempStr.charAt(i)));
		else
			System.out.print(Character.toLowerCase(tempStr.charAt(i)));
		}
		System.out.println();
	}
}