import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String x = scan.nextLine();
		String ux = x.toUpperCase();
		String lx = x.toLowerCase();
		String w[] = x.split("");
		String uw[] = ux.split("");
		String lw[] = lx.split("");
		String[] q;
		q = new String[1200];
		int i;
		for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		}
		for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		}
		System.out.println();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String x = scan.nextLine();
		String ux = x.toUpperCase();
		String lx = x.toLowerCase();
		String w[] = x.split("");
		String uw[] = ux.split("");
		String lw[] = lx.split("");
		String[] q;
		q = new String[1200];
		int i;
		for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		}
		for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		}
		System.out.println();
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String x = scan.nextLine();
		String ux = x.toUpperCase();
		String lx = x.toLowerCase();
		String w[] = x.split("");
		String uw[] = ux.split("");
		String lw[] = lx.split("");
		String[] q;
		q = new String[1200];
		int i;
		for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		}
		for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		}
		System.out.println();
	} main {
		Scanner scan = new Scanner(System.in);
		String x = scan.nextLine();
		String ux = x.toUpperCase();
		String lx = x.toLowerCase();
		String w[] = x.split("");
		String uw[] = ux.split("");
		String lw[] = lx.split("");
		String[] q;
		q = new String[1200];
		int i;
		for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		}
		for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		}
		System.out.println();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String x = scan.nextLine(); x scan.nextLine() scan.nextLine scan String ux = x.toUpperCase(); ux x.toUpperCase() x.toUpperCase x String lx = x.toLowerCase(); lx x.toLowerCase() x.toLowerCase x String w[] = x.split(""); w x.split("") x.split x "" String uw[] = ux.split(""); uw ux.split("") ux.split ux "" String lw[] = lx.split(""); lw lx.split("") lx.split lx "" String[] q; q q = new String[1200] q new String[1200] 1200 int i; i for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		} i = 0; i = 0 i 0 i < x.length() i x.length() x.length x i++ i++ i {
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		} {
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		} if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i]; w[i].equals(uw[i]) w[i].equals w[i] w i uw[i] uw i q[i] = lw[i] q[i] q i lw[i] lw i q[i] = uw[i] q[i] q i uw[i] uw i for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		} i = 0; i = 0 i 0 i < x.length() i x.length() x.length x i++ i++ i {
			System.out.print(q[i]);
		} {
			System.out.print(q[i]);
		} System.out.print(q[i]) System.out.print System.out System System.out q[i] q i System.out.println() System.out.println System.out System System.out String[] args args public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String x = scan.nextLine();
		String ux = x.toUpperCase();
		String lx = x.toLowerCase();
		String w[] = x.split("");
		String uw[] = ux.split("");
		String lw[] = lx.split("");
		String[] q;
		q = new String[1200];
		int i;
		for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		}
		for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		}
		System.out.println();
	}
} public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String x = scan.nextLine();
		String ux = x.toUpperCase();
		String lx = x.toLowerCase();
		String w[] = x.split("");
		String uw[] = ux.split("");
		String lw[] = lx.split("");
		String[] q;
		q = new String[1200];
		int i;
		for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		}
		for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		}
		System.out.println();
	}
} Main
import java.util.Scanner;
public class Main {
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		String x = scan.nextLine();
		String ux = x.toUpperCase();
		String lx = x.toLowerCase();
		String w[] = x.split("");
		String uw[] = ux.split("");
		String lw[] = lx.split("");
		String[] q;
		q = new String[1200];
		int i;
		for(i = 0; i < x.length(); i++){
			if(w[i].equals(uw[i]))
				q[i] = lw[i];
			else
				q[i] = uw[i];
		}
		for(i = 0; i < x.length(); i++){
			System.out.print(q[i]);
		}
		System.out.println();
	}
}