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

public class Main {
	public static void main (String[] args) throws IOException
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));

		String originStr = input.readLine();

		String upperStr = originStr.toUpperCase();

		String lowerStr = originStr.toLowerCase();

		char[] originChar = originStr.toCharArray();

		char[] upperChar = upperStr.toCharArray();

		char[] lowerChar = lowerStr.toCharArray();

		//1文字ずつ比較し、大文字小文字を逆転して表示する
		for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		}

		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 input = new BufferedReader (new InputStreamReader (System.in));

		String originStr = input.readLine();

		String upperStr = originStr.toUpperCase();

		String lowerStr = originStr.toLowerCase();

		char[] originChar = originStr.toCharArray();

		char[] upperChar = upperStr.toCharArray();

		char[] lowerChar = lowerStr.toCharArray();

		//1文字ずつ比較し、大文字小文字を逆転して表示する
		for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		}

		System.out.println();

	}
} Main public static void main (String[] args) throws IOException
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));

		String originStr = input.readLine();

		String upperStr = originStr.toUpperCase();

		String lowerStr = originStr.toLowerCase();

		char[] originChar = originStr.toCharArray();

		char[] upperChar = upperStr.toCharArray();

		char[] lowerChar = lowerStr.toCharArray();

		//1文字ずつ比較し、大文字小文字を逆転して表示する
		for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		}

		System.out.println();

	} main {
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));

		String originStr = input.readLine();

		String upperStr = originStr.toUpperCase();

		String lowerStr = originStr.toLowerCase();

		char[] originChar = originStr.toCharArray();

		char[] upperChar = upperStr.toCharArray();

		char[] lowerChar = lowerStr.toCharArray();

		//1文字ずつ比較し、大文字小文字を逆転して表示する
		for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		}

		System.out.println();

	} BufferedReader input = new BufferedReader (new InputStreamReader (System.in)); input new BufferedReader (new InputStreamReader (System.in)) String originStr = input.readLine(); originStr input.readLine() input.readLine input String upperStr = originStr.toUpperCase(); upperStr originStr.toUpperCase() originStr.toUpperCase originStr String lowerStr = originStr.toLowerCase(); lowerStr originStr.toLowerCase() originStr.toLowerCase originStr char[] originChar = originStr.toCharArray(); originChar originStr.toCharArray() originStr.toCharArray originStr char[] upperChar = upperStr.toCharArray(); upperChar upperStr.toCharArray() upperStr.toCharArray upperStr char[] lowerChar = lowerStr.toCharArray(); lowerChar lowerStr.toCharArray() lowerStr.toCharArray lowerStr for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		} int num = 0; int num = 0; num 0 num < originChar.length num originChar.length originChar originChar.length num++ num++ num {
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		} {
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		} if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			} originChar[num] != upperChar[num] originChar[num] originChar num upperChar[num] upperChar num {
				System.out.print(upperChar[num]);
			} System.out.print(upperChar[num]) System.out.print System.out System System.out upperChar[num] upperChar num {
				System.out.print(lowerChar[num]);
			} System.out.print(lowerChar[num]) System.out.print System.out System System.out lowerChar[num] lowerChar num 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 input = new BufferedReader (new InputStreamReader (System.in));

		String originStr = input.readLine();

		String upperStr = originStr.toUpperCase();

		String lowerStr = originStr.toLowerCase();

		char[] originChar = originStr.toCharArray();

		char[] upperChar = upperStr.toCharArray();

		char[] lowerChar = lowerStr.toCharArray();

		//1文字ずつ比較し、大文字小文字を逆転して表示する
		for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		}

		System.out.println();

	}
} public class Main {
	public static void main (String[] args) throws IOException
	{
		BufferedReader input = new BufferedReader (new InputStreamReader (System.in));

		String originStr = input.readLine();

		String upperStr = originStr.toUpperCase();

		String lowerStr = originStr.toLowerCase();

		char[] originChar = originStr.toCharArray();

		char[] upperChar = upperStr.toCharArray();

		char[] lowerChar = lowerStr.toCharArray();

		//1文字ずつ比較し、大文字小文字を逆転して表示する
		for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		}

		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 input = new BufferedReader (new InputStreamReader (System.in));

		String originStr = input.readLine();

		String upperStr = originStr.toUpperCase();

		String lowerStr = originStr.toLowerCase();

		char[] originChar = originStr.toCharArray();

		char[] upperChar = upperStr.toCharArray();

		char[] lowerChar = lowerStr.toCharArray();

		//1文字ずつ比較し、大文字小文字を逆転して表示する
		for(int num = 0; num < originChar.length; num++)
		{
			if(originChar[num] != upperChar[num])
			{
				System.out.print(upperChar[num]);
			}
			else
			{
				System.out.print(lowerChar[num]);
			}
		}

		System.out.println();

	}
}

