import java.util.Scanner;

//20180510
//03

public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		}
		System.out.println();
		scanner.close();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		}
		System.out.println();
		scanner.close();
    }
} Main public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		}
		System.out.println();
		scanner.close();
    } main {
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		}
		System.out.println();
		scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		} scanner.hasNext() scanner.hasNext scanner {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		} String str = scanner.nextLine(); str scanner.nextLine() scanner.nextLine scanner char[] cha = str.toCharArray(); cha str.toCharArray() str.toCharArray str for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			} int i = 0; int i = 0; i 0 i < cha.length i cha.length cha cha.length i++ i++ i {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			} {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			} if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				} Character.isLowerCase(cha[i]) Character.isLowerCase Character cha[i] cha i {
					cha[i] = Character.toUpperCase(cha[i]);
				} cha[i] = Character.toUpperCase(cha[i]) cha[i] cha i Character.toUpperCase(cha[i]) Character.toUpperCase Character cha[i] cha i if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				} Character.isUpperCase(cha[i]) Character.isUpperCase Character cha[i] cha i {
					cha[i] = Character.toLowerCase(cha[i]);
				} cha[i] = Character.toLowerCase(cha[i]) cha[i] cha i Character.toLowerCase(cha[i]) Character.toLowerCase Character cha[i] cha i String output = String.valueOf(cha); output String.valueOf(cha) String.valueOf String cha System.out.print(output) System.out.print System.out System System.out output System.out.println() System.out.println System.out System System.out scanner.close() scanner.close scanner String[] args args public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		}
		System.out.println();
		scanner.close();
    }
} public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		}
		System.out.println();
		scanner.close();
    }
} Main
import java.util.Scanner;

//20180510
//03

public class Main {
    public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);

		while (scanner.hasNext()) {
			String str = scanner.nextLine();
			char[] cha = str.toCharArray();

			for(int i = 0;i < cha.length;i++) {
				if(Character.isLowerCase(cha[i])) {
					cha[i] = Character.toUpperCase(cha[i]);
				} else 	if(Character.isUpperCase(cha[i])) {
					cha[i] = Character.toLowerCase(cha[i]);
				}
			}

			String output = String.valueOf(cha);
			System.out.print(output);
		}
		System.out.println();
		scanner.close();
    }
}
