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);
		char[] c = new char[1200];
		
		String line = br.readLine();
		for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		}
		
		for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		}
	}
} 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);
		char[] c = new char[1200];
		
		String line = br.readLine();
		for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		}
		
		for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		}
	}
} Main public static void main(String[] args) throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		char[] c = new char[1200];
		
		String line = br.readLine();
		for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		}
		
		for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		}
	} main {
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		char[] c = new char[1200];
		
		String line = br.readLine();
		for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		}
		
		for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		}
	} InputStreamReader isr = new InputStreamReader(System.in); isr new InputStreamReader(System.in) BufferedReader br = new BufferedReader(isr); br new BufferedReader(isr) char[] c = new char[1200]; c new char[1200] 1200 String line = br.readLine(); line br.readLine() br.readLine br for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		} int i = 0; int i = 0; i 0 i < line.length() i line.length() line.length line i++ i++ i {
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		} {
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		} c[i] = line.charAt(i) c[i] c i line.charAt(i) line.charAt line i if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			} Character.isUpperCase(c[i]) Character.isUpperCase Character c[i] c i {
				c[i] = Character.toLowerCase(c[i]);
			} c[i] = Character.toLowerCase(c[i]) c[i] c i Character.toLowerCase(c[i]) Character.toLowerCase Character c[i] c i {
				c[i] = Character.toUpperCase(c[i]);
			} c[i] = Character.toUpperCase(c[i]) c[i] c i Character.toUpperCase(c[i]) Character.toUpperCase Character c[i] c i for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		} int j = 0; int j = 0; j 0 j < line.length() j line.length() line.length line j++ j++ j {
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		} {
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		} System.out.print(c[j]) System.out.print System.out System System.out c[j] c j if(j == line.length() - 1){
				System.out.println();
			} j == line.length() - 1 j line.length() - 1 line.length() line.length line 1 {
				System.out.println();
			} System.out.println() System.out.println System.out System System.out 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);
		char[] c = new char[1200];
		
		String line = br.readLine();
		for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		}
		
		for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		}
	}
} public class Main {

	public static void main(String[] args) throws Exception{
		InputStreamReader isr = new InputStreamReader(System.in);
		BufferedReader br = new BufferedReader(isr);
		char[] c = new char[1200];
		
		String line = br.readLine();
		for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		}
		
		for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		}
	}
} 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);
		char[] c = new char[1200];
		
		String line = br.readLine();
		for(int i = 0; i < line.length(); i++){
			c[i] = line.charAt(i);
			if(Character.isUpperCase(c[i])){
				c[i] = Character.toLowerCase(c[i]);
			}else{
				c[i] = Character.toUpperCase(c[i]);
			}
		}
		
		for(int j = 0; j < line.length(); j++){
			System.out.print(c[j]);
			if(j == line.length() - 1){
				System.out.println();
			}
		}
	}
}