import java.util.*;

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

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