import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	}
} Main public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}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 {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		} String str = br.readLine(); str br.readLine() br.readLine br if(str.length() > 1200) {
				
			} str.length() > 1200 str.length() str.length str 1200 {
				
			} StringBuilder b1 = new StringBuilder(str); b1 new StringBuilder(str) for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			} int i=0; int i=0; i 0 i < str.length() i str.length() str.length str i++ i++ i {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			} {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			} if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				} Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i { //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				} b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() ) b1.replace b1 i i+1 i 1 String.valueOf(str.charAt(i)).toLowerCase() String.valueOf(str.charAt(i)).toLowerCase String.valueOf(str.charAt(i)) String.valueOf String str.charAt(i) str.charAt str i {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				} b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() ) b1.replace b1 i i+1 i 1 String.valueOf(str.charAt(i)).toUpperCase() String.valueOf(str.charAt(i)).toUpperCase String.valueOf(str.charAt(i)) String.valueOf String str.charAt(i) str.charAt str i String t = b1.toString(); t b1.toString() b1.toString b1 System.out.println(t) System.out.println System.out System System.out t String[] args args public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	}
} public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

	public static void main(String[] args) {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		try {
			String str = br.readLine();
			if(str.length() > 1200) {
				
			}
			StringBuilder b1 = new StringBuilder(str);

			for(int i=0; i < str.length(); i++) {

				if( Character.isUpperCase(str.charAt(i))){ //Upper
				    b1.replace(i,i+1,String.valueOf(str.charAt(i)).toLowerCase() );
				}
				else {//Lower
				   b1.replace(i,i+1,String.valueOf(str.charAt(i)).toUpperCase() );
				}
			}
			String t = b1.toString();
			System.out.println(t);

		}catch(IOException e) {
			System.out.println("Exception : " + e);
		}
	}
}
