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



public class Main{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

		}catch(IOException e){
			System.out.println("??????:"+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 reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

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




	}
} Main public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

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




	} main {


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

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




	} BufferedReader reader=new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) String[] text; text int text_num; text_num try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

		}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 "??????:" e {
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

		} text=reader.readLine().split("") text reader.readLine().split("") reader.readLine().split reader.readLine() reader.readLine reader "" text_num=text.length text_num text.length text text.length for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		} int i=0; int i=0; i 0 i<text_num i text_num i++ i++ i {
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		} {
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		} if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			} text[i].equals(text[i].toLowerCase()) text[i].equals text[i] text i text[i].toLowerCase() text[i].toLowerCase text[i] text i {
				text[i]=text[i].toUpperCase();
			} text[i]=text[i].toUpperCase() text[i] text i text[i].toUpperCase() text[i].toUpperCase text[i] text i if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			} text[i].equals(text[i].toUpperCase()) text[i].equals text[i] text i text[i].toUpperCase() text[i].toUpperCase text[i] text i {
				text[i]=text[i].toLowerCase();
			} text[i]=text[i].toLowerCase() text[i] text i text[i].toLowerCase() text[i].toLowerCase text[i] text i System.out.print(text[i]) System.out.print System.out System System.out text[i] text i System.out.println() System.out.println System.out System System.out reader.close() reader.close reader String[] args args public class Main{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

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




	}
} public class Main{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

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




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



public class Main{
	public static void main(String[] args){


		BufferedReader reader=new BufferedReader(new InputStreamReader(System.in));
		String[] text;
		int text_num;

		try{
			text=reader.readLine().split("");

		text_num=text.length;

		for(int i=0;i<text_num;i++){
			if(text[i].equals(text[i].toLowerCase())){
				text[i]=text[i].toUpperCase();
			}
			else if(text[i].equals(text[i].toUpperCase())){
				text[i]=text[i].toLowerCase();
			}

			System.out.print(text[i]);
		}System.out.println();


		reader.close();

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




	}
}