import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String word=br.readLine();
		StringBuilder out=new StringBuilder();
		String w;
		for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		}
		System.out.println(out);
	}
} 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) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String word=br.readLine();
		StringBuilder out=new StringBuilder();
		String w;
		for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		}
		System.out.println(out);
	}
} Main public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String word=br.readLine();
		StringBuilder out=new StringBuilder();
		String w;
		for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		}
		System.out.println(out);
	} main {
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String word=br.readLine();
		StringBuilder out=new StringBuilder();
		String w;
		for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		}
		System.out.println(out);
	} BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String word=br.readLine(); word br.readLine() br.readLine br StringBuilder out=new StringBuilder(); out new StringBuilder() String w; w for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		} int i=0; int i=0; i 0 i<word.length() i word.length() word.length word i++ i++ i {
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		} {
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		} w=word.substring(i,i+1) w word.substring(i,i+1) word.substring word i i+1 i 1 if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			} w.equals(w.toLowerCase()) w.equals w w.toLowerCase() w.toLowerCase w {
				w=w.toUpperCase();
			} w=w.toUpperCase() w w.toUpperCase() w.toUpperCase w if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			} w.equals(w.toUpperCase()) w.equals w w.toUpperCase() w.toUpperCase w {
				w=w.toLowerCase();
			} w=w.toLowerCase() w w.toLowerCase() w.toLowerCase w out.append(w) out.append out w System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String word=br.readLine();
		StringBuilder out=new StringBuilder();
		String w;
		for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		}
		System.out.println(out);
	}
} public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String word=br.readLine();
		StringBuilder out=new StringBuilder();
		String w;
		for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		}
		System.out.println(out);
	}
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String word=br.readLine();
		StringBuilder out=new StringBuilder();
		String w;
		for (int i=0;i<word.length();i++){
			w=word.substring(i,i+1);
			if(w.equals(w.toLowerCase())){
				w=w.toUpperCase();
			}else if(w.equals(w.toUpperCase())){
				w=w.toLowerCase();
			}
		out.append(w);
		}
		System.out.println(out);
	}
}