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


/**
 * Lesson8A 与えられた文字列の小文字と大文字を入れ替えるプログラム
 *
 * @author Internship
 *
 */
public class Main{

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		//1行読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		}

	}
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main{

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		//1行読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		}

	}
} Main /**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		//1行読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		}

	} main {

		//1行読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		}

	} try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		} catch (IOException e) {
			System.out.println(e);
		} IOException e {
			System.out.println(e);
		} System.out.println(e) System.out.println System.out System System.out e {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in)); insBR new BufferedReader(new InputStreamReader(System.in)) String strLine = insBR.readLine(); strLine insBR.readLine() insBR.readLine insBR char[] chaAryLine = strLine.toCharArray(); chaAryLine strLine.toCharArray() strLine.toCharArray strLine for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			} int i = 0; int i = 0; i 0 i < chaAryLine.length i chaAryLine.length chaAryLine chaAryLine.length i++ i++ i {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			} {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			} if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				} Character.isUpperCase(chaAryLine[i]) Character.isUpperCase Character chaAryLine[i] chaAryLine i {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				} chaAryLine[i] = Character.toLowerCase(chaAryLine[i]) chaAryLine[i] chaAryLine i Character.toLowerCase(chaAryLine[i]) Character.toLowerCase Character chaAryLine[i] chaAryLine i if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				} Character.isLowerCase(chaAryLine[i]) Character.isLowerCase Character chaAryLine[i] chaAryLine i {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				} chaAryLine[i] = Character.toUpperCase(chaAryLine[i]) chaAryLine[i] chaAryLine i Character.toUpperCase(chaAryLine[i]) Character.toUpperCase Character chaAryLine[i] chaAryLine i System.out.print(chaAryLine[i]) System.out.print System.out System System.out chaAryLine[i] chaAryLine i System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main{

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		//1行読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		}

	}
} public class Main{

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		//1行読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		}

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


/**
 * Lesson8A 与えられた文字列の小文字と大文字を入れ替えるプログラム
 *
 * @author Internship
 *
 */
public class Main{

	/**
	 * プログラムのエントリポイント
	 *
	 * @param args
	 */
	public static void main(String[] args) {

		//1行読み込む
		try {
			BufferedReader insBR = new BufferedReader(new InputStreamReader(System.in));

			String strLine = insBR.readLine();

			//char型に分解
			char[] chaAryLine = strLine.toCharArray();

			//各charが大文字なら小文字、小文字なら大文字へ
			for(int i = 0; i < chaAryLine.length; i++) {
				if(Character.isUpperCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toLowerCase(chaAryLine[i]);
				}else if(Character.isLowerCase(chaAryLine[i])) {
					chaAryLine[i] = Character.toUpperCase(chaAryLine[i]);
				}

				//出力
				System.out.print(chaAryLine[i]);
			}
			System.out.println("");

		} catch (IOException e) {
			System.out.println(e);
		}

	}
}