import java.io.*;
public class Main {
	void run(){
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str = "";
		try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		}
		char c[] = str.toCharArray();
		for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		}
		System.out.println("");
	}
	public static void main(String args[]){
		Main m = new Main();
		m.run();
	}
} import java.io.*; io.* java public class Main {
	void run(){
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str = "";
		try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		}
		char c[] = str.toCharArray();
		for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		}
		System.out.println("");
	}
	public static void main(String args[]){
		Main m = new Main();
		m.run();
	}
} Main void run(){
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str = "";
		try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		}
		char c[] = str.toCharArray();
		for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		}
		System.out.println("");
	} run {
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str = "";
		try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		}
		char c[] = str.toCharArray();
		for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		}
		System.out.println("");
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String str = ""; str "" try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		} catch(IOException e){
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
		str = br.readLine();
		} str = br.readLine() str br.readLine() br.readLine br char c[] = str.toCharArray(); c str.toCharArray() str.toCharArray str for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		} int i = 0; int i = 0; i 0 i < c.length i c.length c c.length i++ i++ i {
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		} {
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		} if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			} Character.isUpperCase(c[i]) Character.isUpperCase 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 if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(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 System.out.print(c[i]) System.out.print System.out System System.out c[i] c i System.out.println("") System.out.println System.out System System.out "" public static void main(String args[]){
		Main m = new Main();
		m.run();
	} main {
		Main m = new Main();
		m.run();
	} Main m = new Main(); m new Main() m.run() m.run m String args[] args public class Main {
	void run(){
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str = "";
		try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		}
		char c[] = str.toCharArray();
		for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		}
		System.out.println("");
	}
	public static void main(String args[]){
		Main m = new Main();
		m.run();
	}
} public class Main {
	void run(){
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str = "";
		try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		}
		char c[] = str.toCharArray();
		for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		}
		System.out.println("");
	}
	public static void main(String args[]){
		Main m = new Main();
		m.run();
	}
} Main
import java.io.*;
public class Main {
	void run(){
		InputStreamReader is = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(is);
		String str = "";
		try{
		str = br.readLine();
		}catch(IOException e){
			System.out.println(e);
		}
		char c[] = str.toCharArray();
		for(int i = 0;i < c.length;i++){
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else if(Character.isLowerCase(c[i])){
				c[i] = Character.toUpperCase(c[i]);
			}
			System.out.print(c[i]);
		}
		System.out.println("");
	}
	public static void main(String args[]){
		Main m = new Main();
		m.run();
	}
}