import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		char c;
		int i,length=s.length();
		for(i=0;i<length;i++){
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		}
		System.out.print("\n");
	}
}
 import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		char c;
		int i,length=s.length();
		for(i=0;i<length;i++){
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		}
		System.out.print("\n");
	}
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		char c;
		int i,length=s.length();
		for(i=0;i<length;i++){
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		}
		System.out.print("\n");
	} main {
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		char c;
		int i,length=s.length();
		for(i=0;i<length;i++){
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		}
		System.out.print("\n");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.nextLine(); s sc.nextLine() sc.nextLine sc char c; c int i i length=s.length(); length s.length() s.length s for(i=0;i<length;i++){
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		} i=0; i=0 i 0 i<length i length i++ i++ i {
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		} {
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		} c=s.charAt(i) c s.charAt(i) s.charAt s i if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c); Character.isLowerCase(c) Character.isLowerCase Character c System.out.print(Character.toUpperCase(c)) System.out.print System.out System System.out Character.toUpperCase(c) Character.toUpperCase Character c if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(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(c) System.out.print System.out System System.out c System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		char c;
		int i,length=s.length();
		for(i=0;i<length;i++){
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		}
		System.out.print("\n");
	}
} public class Main{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		String s=sc.nextLine();
		char c;
		int i,length=s.length();
		for(i=0;i<length;i++){
			c=s.charAt(i);
			if(Character.isLowerCase(c))System.out.print(Character.toUpperCase(c));
			else if(Character.isUpperCase(c))System.out.print(Character.toLowerCase(c));
			else System.out.print(c);
		}
		System.out.print("\n");
	}
} Main
import java.util.Scanner;

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

