import java.util.*;
public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    }
} import java.util.*; util.* java public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    }
} Main public static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String[] args) throws Exception {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    } main {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    } int i i j; j String moji = sc.nextLine(); moji sc.nextLine() sc.nextLine sc for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	} char c moji.toCharArray() moji.toCharArray moji {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	} {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	} if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		} 'A' <= c && 'Z' >= c 'A' <= c 'A' c 'Z' >= c 'Z' c {
    			System.out.print(Character.toLowerCase(c));
    		} System.out.print(Character.toLowerCase(c)) System.out.print System.out System System.out Character.toLowerCase(c) Character.toLowerCase Character c if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		} 'a' <= c && 'z' >= c 'a' <= c 'a' c 'z' >= c 'z' c {
    			System.out.print(Character.toUpperCase(c));
    		} System.out.print(Character.toUpperCase(c)) System.out.print System.out System System.out Character.toUpperCase(c) Character.toUpperCase Character c {
    			System.out.print(c);
    		} System.out.print(c) System.out.print System.out System System.out c System.out.println() System.out.println System.out System System.out String[] args args public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    }
} public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    }
} Main
import java.util.*;
public class Main {
    public static Scanner sc = new Scanner(System.in);
    public static void main(String[] args) throws Exception {
    	int i, j;
    	
    	String moji = sc.nextLine();
    	
    	for(char c : moji.toCharArray()) {
    		if('A' <= c && 'Z' >= c) {
    			System.out.print(Character.toLowerCase(c));
    		}
    		else if('a' <= c && 'z' >= c) {
    			System.out.print(Character.toUpperCase(c));
    		}
    		else {
    			System.out.print(c);
    		}
    	}
    	System.out.println();
    }
}
