import java.util.Scanner;

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

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