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

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] c = br.readLine().toCharArray();
		for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		}
		System.out.println(String.valueOf(c));
	}
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] c = br.readLine().toCharArray();
		for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		}
		System.out.println(String.valueOf(c));
	}
} Main public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] c = br.readLine().toCharArray();
		for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		}
		System.out.println(String.valueOf(c));
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] c = br.readLine().toCharArray();
		for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		}
		System.out.println(String.valueOf(c));
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) char[] c = br.readLine().toCharArray(); c br.readLine().toCharArray() br.readLine().toCharArray br.readLine() br.readLine br for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		} {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		} if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32; 65 <= c[i] && c[i] <= 90 65 <= c[i] 65 c[i] c i c[i] <= 90 c[i] c i 90 c[i] += 32 c[i] c i 32 if (97 <= c[i] && c[i] <= 122) c[i] -=32; 97 <= c[i] && c[i] <= 122 97 <= c[i] 97 c[i] c i c[i] <= 122 c[i] c i 122 c[i] -=32 c[i] c i 32 System.out.println(String.valueOf(c)) System.out.println System.out System System.out String.valueOf(c) String.valueOf String c String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] c = br.readLine().toCharArray();
		for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		}
		System.out.println(String.valueOf(c));
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] c = br.readLine().toCharArray();
		for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		}
		System.out.println(String.valueOf(c));
	}
} Main
import java.io.InputStreamReader;
import java.io.BufferedReader;
import java.io.IOException;

public class Main {
	public static void main(String[] args) throws IOException {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		char[] c = br.readLine().toCharArray();
		for (int i = 0; i < c.length; i++) {
			if (65 <= c[i] && c[i] <= 90) c[i] += 32;
			else if (97 <= c[i] && c[i] <= 122) c[i] -=32;
		}
		System.out.println(String.valueOf(c));
	}
}