import java.util.Scanner;

public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		scan.useDelimiter("\\n");
		String str = scan.next();
		char[] ans = str.toCharArray();
		
		for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		}
		
		for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		}
		System.out.println("");
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		scan.useDelimiter("\\n");
		String str = scan.next();
		char[] ans = str.toCharArray();
		
		for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		}
		
		for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		}
		System.out.println("");
	}
} Main public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		scan.useDelimiter("\\n");
		String str = scan.next();
		char[] ans = str.toCharArray();
		
		for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		}
		
		for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		}
		System.out.println("");
	} main {
		Scanner scan = new Scanner(System.in);
		scan.useDelimiter("\\n");
		String str = scan.next();
		char[] ans = str.toCharArray();
		
		for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		}
		
		for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		}
		System.out.println("");
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) scan.useDelimiter("\\n") scan.useDelimiter scan "\\n" String str = scan.next(); str scan.next() scan.next scan char[] ans = str.toCharArray(); ans str.toCharArray() str.toCharArray str for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		} int i = 0; int i = 0; i 0 i < ans.length i ans.length ans ans.length i++ i++ i {
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		} {
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		} if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			} Character.isLowerCase(ans[i]) Character.isLowerCase Character ans[i] ans i {
				ans[i] = Character.toUpperCase(ans[i]);
			} ans[i] = Character.toUpperCase(ans[i]) ans[i] ans i Character.toUpperCase(ans[i]) Character.toUpperCase Character ans[i] ans i if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			} Character.isUpperCase(ans[i]) Character.isUpperCase Character ans[i] ans i {
				ans[i] = Character.toLowerCase(ans[i]);
			} ans[i] = Character.toLowerCase(ans[i]) ans[i] ans i Character.toLowerCase(ans[i]) Character.toLowerCase Character ans[i] ans i for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		} int i = 0; int i = 0; i 0 i < ans.length i ans.length ans ans.length i++ i++ i {
			System.out.print(ans[i]);
		} {
			System.out.print(ans[i]);
		} System.out.print(ans[i]) System.out.print System.out System System.out ans[i] ans 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 scan = new Scanner(System.in);
		scan.useDelimiter("\\n");
		String str = scan.next();
		char[] ans = str.toCharArray();
		
		for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		}
		
		for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		}
		System.out.println("");
	}
} public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		scan.useDelimiter("\\n");
		String str = scan.next();
		char[] ans = str.toCharArray();
		
		for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		}
		
		for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		}
		System.out.println("");
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args)
	{
		Scanner scan = new Scanner(System.in);
		scan.useDelimiter("\\n");
		String str = scan.next();
		char[] ans = str.toCharArray();
		
		for(int i = 0;i < ans.length;i++)
		{
			if(Character.isLowerCase(ans[i]))
			{
				ans[i] = Character.toUpperCase(ans[i]);
			}else if(Character.isUpperCase(ans[i])){
				ans[i] = Character.toLowerCase(ans[i]);
			}
		}
		
		for(int i = 0;i < ans.length;i++)
		{
			System.out.print(ans[i]);
		}
		System.out.println("");
	}
}