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

public class Main {
	
	public static void main(String[] args){
		
		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		String strLine = null;
		try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		//????????????????§£???????????????????´?
		char[] ary = strLine.toCharArray();
		//?°???????????????????????????§????????????????????????????´?
		for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		}
		String strNewLine = new String(ary);
		System.out.println(strNewLine);
	}

} 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){
		
		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		String strLine = null;
		try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		//????????????????§£???????????????????´?
		char[] ary = strLine.toCharArray();
		//?°???????????????????????????§????????????????????????????´?
		for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		}
		String strNewLine = new String(ary);
		System.out.println(strNewLine);
	}

} Main public static void main(String[] args){
		
		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		String strLine = null;
		try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		//????????????????§£???????????????????´?
		char[] ary = strLine.toCharArray();
		//?°???????????????????????????§????????????????????????????´?
		for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		}
		String strNewLine = new String(ary);
		System.out.println(strNewLine);
	} main {
		
		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		String strLine = null;
		try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		//????????????????§£???????????????????´?
		char[] ary = strLine.toCharArray();
		//?°???????????????????????????§????????????????????????????´?
		for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		}
		String strNewLine = new String(ary);
		System.out.println(strNewLine);
	} BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in)); insBR new BufferedReader(new InputStreamReader(System.in)) String strLine = null; strLine null try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		} IOException e {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		} e.printStackTrace() e.printStackTrace e {
			strLine = insBR.readLine();
			
		} strLine = insBR.readLine() strLine insBR.readLine() insBR.readLine insBR char[] ary = strLine.toCharArray(); ary strLine.toCharArray() strLine.toCharArray strLine for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		} int i = 0; int i = 0; i 0 i < ary.length i ary.length ary ary.length i++ i++ i {
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		} {
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		} if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			} Character.isLowerCase(ary[i]) Character.isLowerCase Character ary[i] ary i {
				ary[i] = Character.toUpperCase(ary[i]);
			} ary[i] = Character.toUpperCase(ary[i]) ary[i] ary i Character.toUpperCase(ary[i]) Character.toUpperCase Character ary[i] ary i {
				ary[i] = Character.toLowerCase(ary[i]);
			} ary[i] = Character.toLowerCase(ary[i]) ary[i] ary i Character.toLowerCase(ary[i]) Character.toLowerCase Character ary[i] ary i String strNewLine = new String(ary); strNewLine new String(ary) System.out.println(strNewLine) System.out.println System.out System System.out strNewLine String[] args args public class Main {
	
	public static void main(String[] args){
		
		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		String strLine = null;
		try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		//????????????????§£???????????????????´?
		char[] ary = strLine.toCharArray();
		//?°???????????????????????????§????????????????????????????´?
		for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		}
		String strNewLine = new String(ary);
		System.out.println(strNewLine);
	}

} public class Main {
	
	public static void main(String[] args){
		
		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		String strLine = null;
		try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		//????????????????§£???????????????????´?
		char[] ary = strLine.toCharArray();
		//?°???????????????????????????§????????????????????????????´?
		for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		}
		String strNewLine = new String(ary);
		System.out.println(strNewLine);
	}

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

public class Main {
	
	public static void main(String[] args){
		
		BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));
		String strLine = null;
		try {
			strLine = insBR.readLine();
			
		} catch (IOException e) {
			// TODO ????????????????????? catch ????????????
			e.printStackTrace();
		}
		//????????????????§£???????????????????´?
		char[] ary = strLine.toCharArray();
		//?°???????????????????????????§????????????????????????????´?
		for(int i = 0; i < ary.length; i++){
			if(Character.isLowerCase(ary[i])){
				ary[i] = Character.toUpperCase(ary[i]);
			}else{
				ary[i] = Character.toLowerCase(ary[i]);
			}
		}
		String strNewLine = new String(ary);
		System.out.println(strNewLine);
	}

}