import java.util.Scanner;

public class Main {
	 public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String moji=sc.nextLine();
		 for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 }
		 System.out.println();

		 sc.close();
	 }
}
 import java.util.Scanner; Scanner java.util public class Main {
	 public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String moji=sc.nextLine();
		 for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 }
		 System.out.println();

		 sc.close();
	 }
} Main public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String moji=sc.nextLine();
		 for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 }
		 System.out.println();

		 sc.close();
	 } main {
		 Scanner sc = new Scanner(System.in);
		 String moji=sc.nextLine();
		 for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 }
		 System.out.println();

		 sc.close();
	 } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String moji=sc.nextLine(); moji sc.nextLine() sc.nextLine sc for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 } int i=0; int i=0; i 0 i<moji.length() i moji.length() moji.length moji i++ i++ i {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 } {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 } char c=moji.charAt(i); c moji.charAt(i) moji.charAt moji i if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c); 'a'<=c && c<='z' 'a'<=c 'a' c c<='z' c 'z' System.out.print((char)(c-32)) System.out.print System.out System System.out (char)(c-32) c 32 if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c); 'A'<=c && c<='Z' 'A'<=c 'A' c c<='Z' c 'Z' System.out.print((char)(c+32)) System.out.print System.out System System.out (char)(c+32) c 32 System.out.print(c) System.out.print System.out System System.out c System.out.println() System.out.println System.out System System.out sc.close() sc.close sc String[] args args public class Main {
	 public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String moji=sc.nextLine();
		 for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 }
		 System.out.println();

		 sc.close();
	 }
} public class Main {
	 public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String moji=sc.nextLine();
		 for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 }
		 System.out.println();

		 sc.close();
	 }
} Main
import java.util.Scanner;

public class Main {
	 public static void main(String[] args) {
		 Scanner sc = new Scanner(System.in);
		 String moji=sc.nextLine();
		 for(int i=0;i<moji.length();i++) {
			 char c=moji.charAt(i);
			 if('a'<=c && c<='z') System.out.print((char)(c-32));
			 else if ('A'<=c && c<='Z')System.out.print((char)(c+32));
			 else System.out.print(c);
		 }
		 System.out.println();

		 sc.close();
	 }
}

