import java.util.Scanner;


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

			int i;

			String str = sc.nextLine();

			char chArray[] = new char[str.length()];

			for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			}

			for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			}

			for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[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);

			int i;

			String str = sc.nextLine();

			char chArray[] = new char[str.length()];

			for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			}

			for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			}

			for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[i]);

			}
			System.out.println();

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

			int i;

			String str = sc.nextLine();

			char chArray[] = new char[str.length()];

			for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			}

			for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			}

			for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[i]);

			}
			System.out.println();

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

			int i;

			String str = sc.nextLine();

			char chArray[] = new char[str.length()];

			for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			}

			for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			}

			for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[i]);

			}
			System.out.println();

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int i; i String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char chArray[] = new char[str.length()]; chArray new char[str.length()] str.length() str.length str for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			} i = 0; i = 0 i 0 i < str.length() i str.length() str.length str i++ i++ i {

				chArray[i] = str.charAt(i);

			} {

				chArray[i] = str.charAt(i);

			} chArray[i] = str.charAt(i) chArray[i] chArray i str.charAt(i) str.charAt str i for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			} i = 0; i = 0 i 0 i < str.length() i str.length() str.length str i++ i++ i {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			} {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			} if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				} Character.isUpperCase(chArray[i]) Character.isUpperCase Character chArray[i] chArray i {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} chArray[i] = Character.toLowerCase(chArray[i]) chArray[i] chArray i Character.toLowerCase(chArray[i]) Character.toLowerCase Character chArray[i] chArray i if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				} Character.isLowerCase(chArray[i]) Character.isLowerCase Character chArray[i] chArray i {

					chArray[i] = Character.toUpperCase(chArray[i]);

				} chArray[i] = Character.toUpperCase(chArray[i]) chArray[i] chArray i Character.toUpperCase(chArray[i]) Character.toUpperCase Character chArray[i] chArray i for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[i]);

			} i = 0; i = 0 i 0 i < str.length() i str.length() str.length str i++ i++ i {

				System.out.print(chArray[i]);

			} {

				System.out.print(chArray[i]);

			} System.out.print(chArray[i]) System.out.print System.out System System.out chArray[i] chArray 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);

			int i;

			String str = sc.nextLine();

			char chArray[] = new char[str.length()];

			for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			}

			for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			}

			for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[i]);

			}
			System.out.println();

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

			int i;

			String str = sc.nextLine();

			char chArray[] = new char[str.length()];

			for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			}

			for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			}

			for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[i]);

			}
			System.out.println();

	}
} Main
import java.util.Scanner;


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

			int i;

			String str = sc.nextLine();

			char chArray[] = new char[str.length()];

			for(i = 0; i < str.length(); i++) {

				chArray[i] = str.charAt(i);

			}

			for(i = 0; i < str.length(); i++) {

				if(Character.isUpperCase(chArray[i])) {

					chArray[i] = Character.toLowerCase(chArray[i]);

				} else if(Character.isLowerCase(chArray[i])) {

					chArray[i] = Character.toUpperCase(chArray[i]);

				}

			}

			for(i = 0; i < str.length(); i++) {

				System.out.print(chArray[i]);

			}
			System.out.println();

	}
}