/**
*/

//スキャナつかうため

import java.util.Scanner;

public class Main {
	// プログラムのエントリポイント
	public static void main(String[] args) {
		// 入力ストリームの生成
		Scanner sc = new Scanner(System.in);
		String moji = sc.nextLine();
		char [] chmoji = new char [moji.length()];
		for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		}
		System.out.println();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	// プログラムのエントリポイント
	public static void main(String[] args) {
		// 入力ストリームの生成
		Scanner sc = new Scanner(System.in);
		String moji = sc.nextLine();
		char [] chmoji = new char [moji.length()];
		for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		}
		System.out.println();
	}
} Main // プログラムのエントリポイント
	public static void main(String[] args) {
		// 入力ストリームの生成
		Scanner sc = new Scanner(System.in);
		String moji = sc.nextLine();
		char [] chmoji = new char [moji.length()];
		for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		}
		System.out.println();
	} main {
		// 入力ストリームの生成
		Scanner sc = new Scanner(System.in);
		String moji = sc.nextLine();
		char [] chmoji = new char [moji.length()];
		for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		}
		System.out.println();
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String moji = sc.nextLine(); moji sc.nextLine() sc.nextLine sc char [] chmoji = new char [moji.length()]; chmoji new char [moji.length()] moji.length() moji.length moji for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		} int i =0; int i =0; i 0 i<moji.length() i moji.length() moji.length moji i++ i++ i {
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		} {
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		} chmoji[i]   = moji.charAt(i) chmoji[i] chmoji i moji.charAt(i) moji.charAt moji i boolean kekka = Character.isUpperCase(chmoji[i]); kekka Character.isUpperCase(chmoji[i]) Character.isUpperCase Character chmoji[i] chmoji i if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 } kekka == true kekka true {
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 } chmoji[i] = Character.toLowerCase(chmoji[i]) chmoji[i] chmoji i Character.toLowerCase(chmoji[i]) Character.toLowerCase Character chmoji[i] chmoji i {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 } chmoji[i] = Character.toUpperCase(chmoji[i]) chmoji[i] chmoji i Character.toUpperCase(chmoji[i]) Character.toUpperCase Character chmoji[i] chmoji i System.out.print(chmoji[i]) System.out.print System.out System System.out chmoji[i] chmoji i System.out.println() System.out.println System.out System System.out String[] args args public class Main {
	// プログラムのエントリポイント
	public static void main(String[] args) {
		// 入力ストリームの生成
		Scanner sc = new Scanner(System.in);
		String moji = sc.nextLine();
		char [] chmoji = new char [moji.length()];
		for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		}
		System.out.println();
	}
} public class Main {
	// プログラムのエントリポイント
	public static void main(String[] args) {
		// 入力ストリームの生成
		Scanner sc = new Scanner(System.in);
		String moji = sc.nextLine();
		char [] chmoji = new char [moji.length()];
		for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		}
		System.out.println();
	}
} Main
/**
*/

//スキャナつかうため

import java.util.Scanner;

public class Main {
	// プログラムのエントリポイント
	public static void main(String[] args) {
		// 入力ストリームの生成
		Scanner sc = new Scanner(System.in);
		String moji = sc.nextLine();
		char [] chmoji = new char [moji.length()];
		for (int i =0; i<moji.length(); i++){
			 chmoji[i]   = moji.charAt(i);
			  boolean kekka = Character.isUpperCase(chmoji[i]);
			 if (kekka == true ){
				 chmoji[i] = Character.toLowerCase(chmoji[i]);
			 }else {
				 chmoji[i] = Character.toUpperCase(chmoji[i]);
			 }
			 System.out.print(chmoji[i]);

		}
		System.out.println();
	}
}