
import java.util.Scanner;

abstract class Main {

	public static void main(String[] args) {

		// 標準入力
		Scanner sc = new Scanner(System.in);

		// char型に変換
		String words = sc.nextLine();
		char ch[] = words.toCharArray();
				
		//char型の数だけ回す		
		for (int i = 0; i < ch.length; i++) {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		}
		
		for (char chage : ch) {
			System.out.print(chage);
		}
System.out.print("\n");
	}
} import java.util.Scanner; Scanner java.util abstract class Main {

	public static void main(String[] args) {

		// 標準入力
		Scanner sc = new Scanner(System.in);

		// char型に変換
		String words = sc.nextLine();
		char ch[] = words.toCharArray();
				
		//char型の数だけ回す		
		for (int i = 0; i < ch.length; i++) {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		}
		
		for (char chage : ch) {
			System.out.print(chage);
		}
System.out.print("\n");
	}
} Main public static void main(String[] args) {

		// 標準入力
		Scanner sc = new Scanner(System.in);

		// char型に変換
		String words = sc.nextLine();
		char ch[] = words.toCharArray();
				
		//char型の数だけ回す		
		for (int i = 0; i < ch.length; i++) {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		}
		
		for (char chage : ch) {
			System.out.print(chage);
		}
System.out.print("\n");
	} main {

		// 標準入力
		Scanner sc = new Scanner(System.in);

		// char型に変換
		String words = sc.nextLine();
		char ch[] = words.toCharArray();
				
		//char型の数だけ回す		
		for (int i = 0; i < ch.length; i++) {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		}
		
		for (char chage : ch) {
			System.out.print(chage);
		}
System.out.print("\n");
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String words = sc.nextLine(); words sc.nextLine() sc.nextLine sc char ch[] = words.toCharArray(); ch words.toCharArray() words.toCharArray words for (int i = 0; i < ch.length; i++) {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		} int i = 0; int i = 0; i 0 i < ch.length i ch.length ch ch.length i++ i++ i {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		} {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		} if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			} Character.isUpperCase(ch[i]) Character.isUpperCase Character ch[i] ch i {
				ch[i] = Character.toLowerCase(ch[i]);
			} ch[i] = Character.toLowerCase(ch[i]) ch[i] ch i Character.toLowerCase(ch[i]) Character.toLowerCase Character ch[i] ch i {
				ch[i] = Character.toUpperCase(ch[i]);
			} ch[i] = Character.toUpperCase(ch[i]) ch[i] ch i Character.toUpperCase(ch[i]) Character.toUpperCase Character ch[i] ch i for (char chage : ch) {
			System.out.print(chage);
		} char chage ch {
			System.out.print(chage);
		} {
			System.out.print(chage);
		} System.out.print(chage) System.out.print System.out System System.out chage System.out.print("\n") System.out.print System.out System System.out "\n" String[] args args

import java.util.Scanner;

abstract class Main {

	public static void main(String[] args) {

		// 標準入力
		Scanner sc = new Scanner(System.in);

		// char型に変換
		String words = sc.nextLine();
		char ch[] = words.toCharArray();
				
		//char型の数だけ回す		
		for (int i = 0; i < ch.length; i++) {

			//
			if (Character.isUpperCase(ch[i])) {
				ch[i] = Character.toLowerCase(ch[i]);
			} else {
				ch[i] = Character.toUpperCase(ch[i]);
			}
		}
		
		for (char chage : ch) {
			System.out.print(chage);
		}
System.out.print("\n");
	}
}