import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String s=scan.nextLine();
		for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		}
		System.out.println();
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String s=scan.nextLine();
		for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		}
		System.out.println();
		scan.close();
	}
} Main public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String s=scan.nextLine();
		for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		}
		System.out.println();
		scan.close();
	} main {
		Scanner scan=new Scanner(System.in);
		String s=scan.nextLine();
		for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		}
		System.out.println();
		scan.close();
	} Scanner scan=new Scanner(System.in); scan new Scanner(System.in) String s=scan.nextLine(); s scan.nextLine() scan.nextLine scan for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		} int i=0; int i=0; i 0 i<s.length() i s.length() s.length s i++ i++ i {
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		} {
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		} if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			} 65<=(s.charAt(i))&&(s.charAt(i))<=90 65<=(s.charAt(i)) 65 (s.charAt(i)) s.charAt s i (s.charAt(i))<=90 (s.charAt(i)) s.charAt s i 90 {
				System.out.print((char)(s.charAt(i)+32));
			} System.out.print((char)(s.charAt(i)+32)) System.out.print System.out System System.out (char)(s.charAt(i)+32) s.charAt(i) s.charAt s i 32 if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			} 97<=(s.charAt(i))&&(s.charAt(i))<=122 97<=(s.charAt(i)) 97 (s.charAt(i)) s.charAt s i (s.charAt(i))<=122 (s.charAt(i)) s.charAt s i 122 {
				System.out.print((char)(s.charAt(i)-32));
			} System.out.print((char)(s.charAt(i)-32)) System.out.print System.out System System.out (char)(s.charAt(i)-32) s.charAt(i) s.charAt s i 32 {
				System.out.print(s.charAt(i));
			} System.out.print(s.charAt(i)) System.out.print System.out System System.out s.charAt(i) s.charAt s i System.out.println() System.out.println System.out System System.out scan.close() scan.close scan String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String s=scan.nextLine();
		for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		}
		System.out.println();
		scan.close();
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String s=scan.nextLine();
		for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		}
		System.out.println();
		scan.close();
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan=new Scanner(System.in);
		String s=scan.nextLine();
		for(int i=0;i<s.length();i++){
			if(65<=(s.charAt(i))&&(s.charAt(i))<=90){
				System.out.print((char)(s.charAt(i)+32));
			}else if(97<=(s.charAt(i))&&(s.charAt(i))<=122){
				System.out.print((char)(s.charAt(i)-32));
			}else{
				System.out.print(s.charAt(i));
			}
		}
		System.out.println();
		scan.close();
	}
}