import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.StringBuilder;
public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		char[] ch = sc.readLine().toCharArray();
		for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		}
		System.out.println(sb);
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.lang.StringBuilder; StringBuilder java.lang public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		char[] ch = sc.readLine().toCharArray();
		for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		}
		System.out.println(sb);
	}
} Main public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		char[] ch = sc.readLine().toCharArray();
		for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		}
		System.out.println(sb);
	} main {
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		char[] ch = sc.readLine().toCharArray();
		for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		}
		System.out.println(sb);
	} BufferedReader sc = new BufferedReader(new InputStreamReader(System.in)); sc new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() char[] ch = sc.readLine().toCharArray(); ch sc.readLine().toCharArray() sc.readLine().toCharArray sc.readLine() sc.readLine sc for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		} char c ch {
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		} {
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		} String s = String.valueOf(c); s String.valueOf(c) String.valueOf String c if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			} c < 'a' c 'a' {
				sb.append(s.toLowerCase());
			} sb.append(s.toLowerCase()) sb.append sb s.toLowerCase() s.toLowerCase s if(c >= 'a'){
				sb.append(s.toUpperCase());
			} c >= 'a' c 'a' {
				sb.append(s.toUpperCase());
			} sb.append(s.toUpperCase()) sb.append sb s.toUpperCase() s.toUpperCase s System.out.println(sb) System.out.println System.out System System.out sb String[] args args public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		char[] ch = sc.readLine().toCharArray();
		for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		}
		System.out.println(sb);
	}
} public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		char[] ch = sc.readLine().toCharArray();
		for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		}
		System.out.println(sb);
	}
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.lang.StringBuilder;
public class Main {
	public static void main(String[] args) throws Exception{
		BufferedReader sc = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		char[] ch = sc.readLine().toCharArray();
		for(char c:ch){
			String s = String.valueOf(c);
			if(c < 'a'){
				sb.append(s.toLowerCase());
			}else if(c >= 'a'){
				sb.append(s.toUpperCase());
			}
		}
		System.out.println(sb);
	}
}