import java.util.Scanner;

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

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

	for(int i=0;i<str.length();i++){
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	}
	System.out.println();
    }
} Main public static void main(String[] args){
	Scanner in = new Scanner(System.in);
	String str = in.nextLine();
	char c;

	for(int i=0;i<str.length();i++){
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	}
	System.out.println();
    } main {
	Scanner in = new Scanner(System.in);
	String str = in.nextLine();
	char c;

	for(int i=0;i<str.length();i++){
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	}
	System.out.println();
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) String str = in.nextLine(); str in.nextLine() in.nextLine in char c; c for(int i=0;i<str.length();i++){
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	} {
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	} c=str.charAt(i) c str.charAt(i) str.charAt str i if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c)); Character.isUpperCase(c) Character.isUpperCase Character c System.out.print(Character.toLowerCase(c)) System.out.print System.out System System.out Character.toLowerCase(c) Character.toLowerCase Character c System.out.print(Character.toUpperCase(c)) System.out.print System.out System System.out Character.toUpperCase(c) Character.toUpperCase Character c System.out.println() System.out.println System.out System System.out String[] args args public class Main{
    public static void main(String[] args){
	Scanner in = new Scanner(System.in);
	String str = in.nextLine();
	char c;

	for(int i=0;i<str.length();i++){
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	}
	System.out.println();
    }
} public class Main{
    public static void main(String[] args){
	Scanner in = new Scanner(System.in);
	String str = in.nextLine();
	char c;

	for(int i=0;i<str.length();i++){
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	}
	System.out.println();
    }
} Main
import java.util.Scanner;

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

	for(int i=0;i<str.length();i++){
	    c=str.charAt(i);
	    if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
	    else System.out.print(Character.toUpperCase(c));
	}
	System.out.println();
    }
}
							   
	

