import java.io.*;
public class Main {

	public static void main(String[] args) throws IOException{
		String s;
		BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
			s = kbd.readLine();
			for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			}
				System.out.println("");
	}

} import java.io.*; io.* java public class Main {

	public static void main(String[] args) throws IOException{
		String s;
		BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
			s = kbd.readLine();
			for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			}
				System.out.println("");
	}

} Main public static void main(String[] args) throws IOException{
		String s;
		BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
			s = kbd.readLine();
			for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			}
				System.out.println("");
	} main {
		String s;
		BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
			s = kbd.readLine();
			for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			}
				System.out.println("");
	} String s; s BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in)); kbd new BufferedReader(new InputStreamReader(System.in)) s = kbd.readLine() s kbd.readLine() kbd.readLine kbd for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			} int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			} {
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			} if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i)); Character.isUpperCase(s.charAt(i)) Character.isUpperCase Character s.charAt(i) s.charAt s i System.out.print(Character.toLowerCase(s.charAt(i))) System.out.print System.out System System.out Character.toLowerCase(s.charAt(i)) Character.toLowerCase Character s.charAt(i) s.charAt s i if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i)); Character.isLowerCase(s.charAt(i)) Character.isLowerCase Character s.charAt(i) s.charAt s i System.out.print(Character.toUpperCase(s.charAt(i))) System.out.print System.out System System.out Character.toUpperCase(s.charAt(i)) Character.toUpperCase Character s.charAt(i) s.charAt s i System.out.print(s.charAt(i)) System.out.print System.out System System.out s.charAt(i) s.charAt s i System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

	public static void main(String[] args) throws IOException{
		String s;
		BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
			s = kbd.readLine();
			for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			}
				System.out.println("");
	}

} public class Main {

	public static void main(String[] args) throws IOException{
		String s;
		BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
			s = kbd.readLine();
			for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			}
				System.out.println("");
	}

} Main
import java.io.*;
public class Main {

	public static void main(String[] args) throws IOException{
		String s;
		BufferedReader kbd = new BufferedReader(new InputStreamReader(System.in));
			s = kbd.readLine();
			for(int i = 0; i < s.length(); i++){
				if(Character.isUpperCase(s.charAt(i)))
					System.out.print(Character.toLowerCase(s.charAt(i)));
				else if(Character.isLowerCase(s.charAt(i)))
					System.out.print(Character.toUpperCase(s.charAt(i)));
				else
					System.out.print(s.charAt(i));
			}
				System.out.println("");
	}

}