import java.io.*;

class Main{
	public static void main(String[] args){
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			char c;
			for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			}
			System.out.println();
		} catch(IOException e){
			System.out.println("Exception :" + e);
		}
	}
} import java.io.*; io.* java class Main{
	public static void main(String[] args){
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			char c;
			for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			}
			System.out.println();
		} catch(IOException e){
			System.out.println("Exception :" + e);
		}
	}
} Main public static void main(String[] args){
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			char c;
			for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			}
			System.out.println();
		} catch(IOException e){
			System.out.println("Exception :" + e);
		}
	} main {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			char c;
			for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			}
			System.out.println();
		} catch(IOException e){
			System.out.println("Exception :" + e);
		}
	} try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			char c;
			for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			}
			System.out.println();
		} catch(IOException e){
			System.out.println("Exception :" + e);
		} catch(IOException e){
			System.out.println("Exception :" + e);
		} IOException e {
			System.out.println("Exception :" + e);
		} System.out.println("Exception :" + e) System.out.println System.out System System.out "Exception :" + e "Exception :" e {
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			char c;
			for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			}
			System.out.println();
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br char c; c for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			} int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			} {
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			} c = str.charAt(i) c str.charAt(i) str.charAt str i if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c); Character.isUpperCase(c) Character.isUpperCase Character c c = Character.toLowerCase(c) c Character.toLowerCase(c) Character.toLowerCase Character c if( Character.isLowerCase(c) ) c = Character.toUpperCase(c); Character.isLowerCase(c) Character.isLowerCase Character c c = Character.toUpperCase(c) c Character.toUpperCase(c) Character.toUpperCase Character c System.out.print(c) System.out.print System.out System System.out c System.out.println() System.out.println System.out System System.out String[] args args
import java.io.*;

class Main{
	public static void main(String[] args){
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String str = br.readLine();
			char c;
			for( int i=0; i<str.length(); i++ ){
				c = str.charAt(i);
				if( Character.isUpperCase(c) ) c = Character.toLowerCase(c);
				else if( Character.isLowerCase(c) ) c = Character.toUpperCase(c);
				System.out.print(c);
			}
			System.out.println();
		} catch(IOException e){
			System.out.println("Exception :" + e);
		}
	}
}