import java.io.IOException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException{

		Scanner sc = new Scanner(System.in);

		String x = sc.nextLine();
		char[] line = x.toCharArray();

		for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		}
		System.out.println();
		sc.close();
	}
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) throws IOException{

		Scanner sc = new Scanner(System.in);

		String x = sc.nextLine();
		char[] line = x.toCharArray();

		for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		}
		System.out.println();
		sc.close();
	}
} Main public static void main(String[] args) throws IOException{

		Scanner sc = new Scanner(System.in);

		String x = sc.nextLine();
		char[] line = x.toCharArray();

		for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		}
		System.out.println();
		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);

		String x = sc.nextLine();
		char[] line = x.toCharArray();

		for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		}
		System.out.println();
		sc.close();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String x = sc.nextLine(); x sc.nextLine() sc.nextLine sc char[] line = x.toCharArray(); line x.toCharArray() x.toCharArray x for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		} int i=0; int i=0; i 0 i<x.length() i x.length() x.length x i++ i++ i {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		} {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		} if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			} Character.isUpperCase(line[i]) Character.isUpperCase Character line[i] line i {
				line[i] = Character.toLowerCase(line[i]);
			} line[i] = Character.toLowerCase(line[i]) line[i] line i Character.toLowerCase(line[i]) Character.toLowerCase Character line[i] line i if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			} Character.isLowerCase(line[i]) Character.isLowerCase Character line[i] line i {
				line[i] = Character.toUpperCase(line[i]);
			} line[i] = Character.toUpperCase(line[i]) line[i] line i Character.toUpperCase(line[i]) Character.toUpperCase Character line[i] line i System.out.print(line[i]) System.out.print System.out System System.out line[i] line i System.out.println() System.out.println System.out System System.out sc.close() sc.close sc String[] args args public class Main {
	public static void main(String[] args) throws IOException{

		Scanner sc = new Scanner(System.in);

		String x = sc.nextLine();
		char[] line = x.toCharArray();

		for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		}
		System.out.println();
		sc.close();
	}
} public class Main {
	public static void main(String[] args) throws IOException{

		Scanner sc = new Scanner(System.in);

		String x = sc.nextLine();
		char[] line = x.toCharArray();

		for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		}
		System.out.println();
		sc.close();
	}
} Main
import java.io.IOException;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) throws IOException{

		Scanner sc = new Scanner(System.in);

		String x = sc.nextLine();
		char[] line = x.toCharArray();

		for(int i=0;i<x.length();i++) {
			if(Character.isUpperCase(line[i])) {
				line[i] = Character.toLowerCase(line[i]);
			}else if(Character.isLowerCase(line[i])) {
				line[i] = Character.toUpperCase(line[i]);
			}
			System.out.print(line[i]);
		}
		System.out.println();
		sc.close();
	}
}
