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

public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char ch;


		try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} 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 final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char ch;


		try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main public static final int BIG_NUM  = 2000000000; BIG_NUM 2000000000 public static final int MOD  = 1000000007; MOD 1000000007 public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char ch;


		try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		}
	} main {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char ch;


		try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char ch; ch try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} IOException e {
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} String inputed = br.readLine(); inputed br.readLine() br.readLine br for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			} int i = 0; int i = 0; i 0 i < inputed.length() i inputed.length() inputed.length inputed i++ i++ i {
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			} {
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			} ch = inputed.charAt(i) ch inputed.charAt(i) inputed.charAt inputed i if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				} ch >= 'a' && ch <= 'z' ch >= 'a' ch 'a' ch <= 'z' ch 'z' {
					System.out.printf("%c", ch-32);
				} System.out.printf("%c", ch-32) System.out.printf System.out System System.out "%c" ch-32 ch 32 if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				} ch >= 'A' && ch <= 'Z' ch >= 'A' ch 'A' ch <= 'Z' ch 'Z' {
					System.out.printf("%c", ch+32);
				} System.out.printf("%c", ch+32) System.out.printf System.out System System.out "%c" ch+32 ch 32 {
					System.out.printf("%c", ch);
				} System.out.printf("%c", ch) System.out.printf System.out System System.out "%c" ch System.out.printf("\n") System.out.printf System.out System System.out "\n" String[] args args public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char ch;


		try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char ch;


		try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static final int BIG_NUM  = 2000000000;
	public static final int MOD  = 1000000007;

	public static void main(String[] args) {

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char ch;


		try {

			String inputed = br.readLine();

			for(int i = 0; i < inputed.length(); i++){
				ch = inputed.charAt(i);

				if(ch >= 'a' && ch <= 'z'){
					System.out.printf("%c", ch-32);
				}else if(ch >= 'A' && ch <= 'Z'){
					System.out.printf("%c", ch+32);
				}else{
					System.out.printf("%c", ch);
				}
			}
			System.out.printf("\n");

		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}
