import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] output = new char[1200];

		for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		}
		for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		}
		System.out.println();
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] output = new char[1200];

		for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		}
		for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		}
		System.out.println();
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] output = new char[1200];

		for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		}
		for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		}
		System.out.println();
	} main {
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] output = new char[1200];

		for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		}
		for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		}
		System.out.println();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc char[] output = new char[1200]; output new char[1200] 1200 for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		} int i = 0; int i = 0; i 0 i < input.length() i input.length() input.length input i++ i++ i {
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		} {
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		} if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i); 'A' <= input.charAt(i) && input.charAt(i) <= 'Z' 'A' <= input.charAt(i) 'A' input.charAt(i) input.charAt input i input.charAt(i) <= 'Z' input.charAt(i) input.charAt input i 'Z' output[i] = Character.toLowerCase(input.charAt(i)) output[i] output i Character.toLowerCase(input.charAt(i)) Character.toLowerCase Character input.charAt(i) input.charAt input i if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i); 'a' <= input.charAt(i) && input.charAt(i) <= 'z' 'a' <= input.charAt(i) 'a' input.charAt(i) input.charAt input i input.charAt(i) <= 'z' input.charAt(i) input.charAt input i 'z' output[i] = Character.toUpperCase(input.charAt(i)) output[i] output i Character.toUpperCase(input.charAt(i)) Character.toUpperCase Character input.charAt(i) input.charAt input i output[i] = input.charAt(i) output[i] output i input.charAt(i) input.charAt input i for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		} int i = 0; int i = 0; i 0 i < input.length() i input.length() input.length input i++ i++ i {
			System.out.print(output[i]);
		} {
			System.out.print(output[i]);
		} System.out.print(output[i]) System.out.print System.out System System.out output[i] output i System.out.println() System.out.println System.out System System.out String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] output = new char[1200];

		for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		}
		for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		}
		System.out.println();
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] output = new char[1200];

		for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		}
		for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		}
		System.out.println();
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();
		char[] output = new char[1200];

		for(int i = 0;i < input.length();i++){
			if('A' <= input.charAt(i) && input.charAt(i) <= 'Z') output[i] = Character.toLowerCase(input.charAt(i));
			else if('a' <= input.charAt(i) && input.charAt(i) <= 'z') output[i] = Character.toUpperCase(input.charAt(i));
			else output[i] = input.charAt(i);
		}
		for(int i = 0;i < input.length();i++){
			System.out.print(output[i]);
		}
		System.out.println();
	}
}
