import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
} import java.util.*; util.* java public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
} Main private static final Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	} main {
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	} String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan StringBuffer sb = new StringBuffer(); sb new StringBuffer() for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		} int i = 0; int i = 0; i 0 i < input.length() i input.length() input.length input i++ i++ i {
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		} {
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		} char ch = input.charAt(i); ch input.charAt(i) input.charAt input i String c = String.valueOf(ch); c String.valueOf(ch) String.valueOf String ch if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			} Character.isLowerCase(ch) Character.isLowerCase Character ch {
				c = c.toUpperCase();
			} c = c.toUpperCase() c c.toUpperCase() c.toUpperCase c if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			} Character.isUpperCase(ch) Character.isUpperCase Character ch {
				c = c.toLowerCase();
			} c = c.toLowerCase() c c.toLowerCase() c.toLowerCase c sb.append(c) sb.append sb c String output = sb.toString(); output sb.toString() sb.toString sb System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
} public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
} Main
import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		String input = scan.nextLine();
		StringBuffer sb = new StringBuffer();
		for(int i = 0; i < input.length(); i++){
			char ch = input.charAt(i);
			String c = String.valueOf(ch);
			if(Character.isLowerCase(ch)){
				c = c.toUpperCase();
			} else if(Character.isUpperCase(ch)){
				c = c.toLowerCase();
			}
			sb.append(c);
		}
		String output = sb.toString();
		System.out.println(output);
	}
}