import java.util.Scanner;

public class Main {

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

		String str = sc.nextLine();

		char[] str1 = str.toCharArray();

		for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[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 str = sc.nextLine();

		char[] str1 = str.toCharArray();

		for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		}
        System.out.println();


	}

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

		String str = sc.nextLine();

		char[] str1 = str.toCharArray();

		for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		}
        System.out.println();


	} main {
		Scanner sc = new Scanner(System.in);

		String str = sc.nextLine();

		char[] str1 = str.toCharArray();

		for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		}
        System.out.println();


	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char[] str1 = str.toCharArray(); str1 str.toCharArray() str.toCharArray str for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		} int i = 0; int i = 0; i 0 i < str1.length i str1.length str1 str1.length i++ i++ i {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		} {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		} if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			} Character.isUpperCase(str1[i]) Character.isUpperCase Character str1[i] str1 i {
				str1[i] = Character.toLowerCase(str1[i]);
			} str1[i] = Character.toLowerCase(str1[i]) str1[i] str1 i Character.toLowerCase(str1[i]) Character.toLowerCase Character str1[i] str1 i if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			} Character.isLowerCase(str1[i]) Character.isLowerCase Character str1[i] str1 i {
				str1[i] = Character.toUpperCase(str1[i]);
			} str1[i] = Character.toUpperCase(str1[i]) str1[i] str1 i Character.toUpperCase(str1[i]) Character.toUpperCase Character str1[i] str1 i System.out.print(str1[i]) System.out.print System.out System System.out str1[i] str1 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 str = sc.nextLine();

		char[] str1 = str.toCharArray();

		for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		}
        System.out.println();


	}

} public class Main {

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

		String str = sc.nextLine();

		char[] str1 = str.toCharArray();

		for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[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 str = sc.nextLine();

		char[] str1 = str.toCharArray();

		for (int i = 0; i < str1.length; i++) {
			if (Character.isUpperCase(str1[i])) {
				str1[i] = Character.toLowerCase(str1[i]);
			}else if(Character.isLowerCase(str1[i])){
				str1[i] = Character.toUpperCase(str1[i]);
			}
			System.out.print(str1[i]);
		}
        System.out.println();


	}

}