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