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 strin=br.readLine();
		String[] str=strin.split("");
		
		
		
		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}br.close();
		System.out.println();
		}} 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 strin=br.readLine();
		String[] str=strin.split("");
		
		
		
		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}br.close();
		System.out.println();
		}} Main public static void main(String[] args) throws IOException{
		// 入力導入部
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		
		String strin=br.readLine();
		String[] str=strin.split("");
		
		
		
		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}br.close();
		System.out.println();
		} main {
		// 入力導入部
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		
		String strin=br.readLine();
		String[] str=strin.split("");
		
		
		
		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}br.close();
		System.out.println();
		} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String strin=br.readLine(); strin br.readLine() br.readLine br String[] str=strin.split(""); str strin.split("") strin.split strin "" for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		} int i=0; int i=0; i 0 i<str.length i str.length str str.length i++ i++ i {
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		} {
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		} if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase()); str[i].equals(str[i].toLowerCase()) str[i].equals str[i] str i str[i].toLowerCase() str[i].toLowerCase str[i] str i {
				System.out.print(str[i].toUpperCase());
			} System.out.print(str[i].toUpperCase()) System.out.print System.out System System.out str[i].toUpperCase() str[i].toUpperCase str[i] str i System.out.print(str[i].toLowerCase()) System.out.print System.out System System.out str[i].toLowerCase() str[i].toLowerCase str[i] str i br.close() br.close br 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 strin=br.readLine();
		String[] str=strin.split("");
		
		
		
		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}br.close();
		System.out.println();
		}} public class Main {

	public static void main(String[] args) throws IOException{
		// 入力導入部
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		
		
		String strin=br.readLine();
		String[] str=strin.split("");
		
		
		
		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}br.close();
		System.out.println();
		}} 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 strin=br.readLine();
		String[] str=strin.split("");
		
		
		
		for(int i=0;i<str.length;i++){
			if(str[i].equals(str[i].toLowerCase())){
				System.out.print(str[i].toUpperCase());
			}else System.out.print(str[i].toLowerCase());
		}br.close();
		System.out.println();
		}}