import java.io.*;

public class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		char[] ch = new char[1200];
		int len, cnt = 0;
		try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} catch(IOException e){
			System.out.println(e);
		}
		
		
		
		
		System.out.println(ch);
	}
} import java.io.*; io.* java public class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		char[] ch = new char[1200];
		int len, cnt = 0;
		try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} catch(IOException e){
			System.out.println(e);
		}
		
		
		
		
		System.out.println(ch);
	}
} Main public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		char[] ch = new char[1200];
		int len, cnt = 0;
		try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} catch(IOException e){
			System.out.println(e);
		}
		
		
		
		
		System.out.println(ch);
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		char[] ch = new char[1200];
		int len, cnt = 0;
		try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} catch(IOException e){
			System.out.println(e);
		}
		
		
		
		
		System.out.println(ch);
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str char[] ch = new char[1200]; ch new char[1200] 1200 int len len cnt = 0; cnt 0 try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} 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();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} str = br.readLine() str br.readLine() br.readLine br len = str.length() len str.length() str.length str ch = str.toCharArray() ch str.toCharArray() str.toCharArray str for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		} int i = 0; int i = 0; i 0 i < len i len i++ i++ i {
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		} {
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		} if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				} 'a' <= ch[i] && ch[i] <= 'z' 'a' <= ch[i] 'a' ch[i] ch i ch[i] <= 'z' ch[i] ch i 'z' {
					ch[i] = Character.toUpperCase(ch[i]);
				} ch[i] = Character.toUpperCase(ch[i]) ch[i] ch i Character.toUpperCase(ch[i]) Character.toUpperCase Character ch[i] ch i if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				} 'A' <= ch[i] && ch[i] <= 'Z' 'A' <= ch[i] 'A' ch[i] ch i ch[i] <= 'Z' ch[i] ch i 'Z' {
					ch[i] = Character.toLowerCase(ch[i]);
				} ch[i] = Character.toLowerCase(ch[i]) ch[i] ch i Character.toLowerCase(ch[i]) Character.toLowerCase Character ch[i] ch i System.out.println(ch) System.out.println System.out System System.out ch String args[] args public class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		char[] ch = new char[1200];
		int len, cnt = 0;
		try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} catch(IOException e){
			System.out.println(e);
		}
		
		
		
		
		System.out.println(ch);
	}
} public class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		char[] ch = new char[1200];
		int len, cnt = 0;
		try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} catch(IOException e){
			System.out.println(e);
		}
		
		
		
		
		System.out.println(ch);
	}
} Main
import java.io.*;

public class Main{
	public static void main(String args[]){
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String str;
		char[] ch = new char[1200];
		int len, cnt = 0;
		try{
			str = br.readLine();
			len = str.length();
			ch = str.toCharArray();
			
			for(int i = 0; i < len; i++){
				if('a' <= ch[i] && ch[i] <= 'z'){
					ch[i] = Character.toUpperCase(ch[i]);
				}
				else if('A' <= ch[i] && ch[i] <= 'Z'){
					ch[i] = Character.toLowerCase(ch[i]);
				}
		}
		} catch(IOException e){
			System.out.println(e);
		}
		
		
		
		
		System.out.println(ch);
	}
}