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

public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
    	String input = br.readLine();
    	String ans = "";
    	for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	}
    	System.out.println(ans);
	}

} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
    	String input = br.readLine();
    	String ans = "";
    	for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	}
    	System.out.println(ans);
	}

} Main public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
    	String input = br.readLine();
    	String ans = "";
    	for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	}
    	System.out.println(ans);
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
    	String input = br.readLine();
    	String ans = "";
    	for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	}
    	System.out.println(ans);
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) String input = br.readLine(); input br.readLine() br.readLine br String ans = ""; ans "" for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	} int i = 0; int i = 0; i 0 i < input.length() i input.length() input.length input i++ i++ i {
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	} {
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	} if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i))); Character.isLowerCase(input.charAt(i)) Character.isLowerCase Character input.charAt(i) input.charAt input i ans += String.valueOf(Character.toUpperCase(input.charAt(i))) ans String.valueOf(Character.toUpperCase(input.charAt(i))) String.valueOf String Character.toUpperCase(input.charAt(i)) Character.toUpperCase Character input.charAt(i) input.charAt input i ans += String.valueOf(Character.toLowerCase(input.charAt(i))) ans String.valueOf(Character.toLowerCase(input.charAt(i))) String.valueOf String Character.toLowerCase(input.charAt(i)) Character.toLowerCase Character input.charAt(i) input.charAt input i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
    	String input = br.readLine();
    	String ans = "";
    	for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	}
    	System.out.println(ans);
	}

} public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
    	String input = br.readLine();
    	String ans = "";
    	for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	}
    	System.out.println(ans);
	}

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

public class Main {
	public static void main(String[] args)throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(isr);
        
    	String input = br.readLine();
    	String ans = "";
    	for (int i = 0; i < input.length(); i++)
    	{
    		if (Character.isLowerCase(input.charAt(i)))
    			ans += String.valueOf(Character.toUpperCase(input.charAt(i)));
    		else
    			ans += String.valueOf(Character.toLowerCase(input.charAt(i)));
    	}
    	System.out.println(ans);
	}

}