import java.io.*;

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

public class Main{
	public static void main(String[] args)throws Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String s;
		StringBuilder sb = new StringBuilder();
		
		s = br.readLine();
		
		for(int i=0; i<s.length(); i++){
			char c = s.charAt(i);
			if(Character.isLetter(c)){
				if(Character.isUpperCase(c)){
					sb.append(Character.toLowerCase(c));
				}else{
					sb.append(Character.toUpperCase(c));
				}
			}else{
				sb.append(c);
			}	
		}
		
		System.out.println(sb);
		
	}
}