import java.util.Scanner;
public class Main {
    public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	char[] inputArray = new char[input.length()];
	for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	}
	System.out.println(String.valueOf(inputArray));
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	char[] inputArray = new char[input.length()];
	for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	}
	System.out.println(String.valueOf(inputArray));
    }
} Main public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	char[] inputArray = new char[input.length()];
	for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	}
	System.out.println(String.valueOf(inputArray));
    } main {
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	char[] inputArray = new char[input.length()];
	for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	}
	System.out.println(String.valueOf(inputArray));
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String input = scan.nextLine(); input scan.nextLine() scan.nextLine scan char[] inputArray = new char[input.length()]; inputArray new char[input.length()] input.length() input.length input for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	} int i = 0; int i = 0; i 0 i < input.length() i input.length() input.length input i++ i++ i {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	} {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	} char alpabet = input.charAt(i); alpabet input.charAt(i) input.charAt input i if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    } Character.isUpperCase(alpabet) Character.isUpperCase Character alpabet {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } inputArray[i] = Character.toLowerCase(alpabet) inputArray[i] inputArray i Character.toLowerCase(alpabet) Character.toLowerCase Character alpabet if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    } Character.isLowerCase(alpabet) Character.isLowerCase Character alpabet {
		inputArray[i] = Character.toUpperCase(alpabet);
	    } inputArray[i] = Character.toUpperCase(alpabet) inputArray[i] inputArray i Character.toUpperCase(alpabet) Character.toUpperCase Character alpabet {
		inputArray[i] = alpabet;
	    } inputArray[i] = alpabet inputArray[i] inputArray i alpabet System.out.println(String.valueOf(inputArray)) System.out.println System.out System System.out String.valueOf(inputArray) String.valueOf String inputArray String[] args args public class Main {
    public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	char[] inputArray = new char[input.length()];
	for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	}
	System.out.println(String.valueOf(inputArray));
    }
} public class Main {
    public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	char[] inputArray = new char[input.length()];
	for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	}
	System.out.println(String.valueOf(inputArray));
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main (String[] args) {
	Scanner scan = new Scanner(System.in);
	String input = scan.nextLine();
	char[] inputArray = new char[input.length()];
	for (int i = 0; i < input.length(); i++) {
	    char alpabet = input.charAt(i);
	    if (Character.isUpperCase(alpabet)) {
		inputArray[i] = Character.toLowerCase(alpabet);
	    } else if (Character.isLowerCase(alpabet)){
		inputArray[i] = Character.toUpperCase(alpabet);
	    } else {
		inputArray[i] = alpabet;
	    }
	}
	System.out.println(String.valueOf(inputArray));
    }
}