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

import java.io.IOException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
public class Main {
	public static void main(String[] args) throws IOException{
		BufferedReader br=new BufferedReader(new InputStreamReader(System.in));
		String str=br.readLine();
		for(int i=0;i<str.length();i++){
			String ans=str.substring(i, i+1);
			if(ans.equals(ans.toLowerCase())) ans=ans.toUpperCase();
			else if(ans.equals(ans.toUpperCase())) ans=ans.toLowerCase();
			System.out.print(ans);
		}
		System.out.println("");
	}
}