import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		String in = scanner.nextLine();
		String out = "";
		for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		}
		
		System.out.println(out);
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		String in = scanner.nextLine();
		String out = "";
		for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		}
		
		System.out.println(out);
	}
} Main public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		String in = scanner.nextLine();
		String out = "";
		for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		}
		
		System.out.println(out);
	} main {
		Scanner scanner = new Scanner(System.in);
		
		String in = scanner.nextLine();
		String out = "";
		for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		}
		
		System.out.println(out);
	} Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String in = scanner.nextLine(); in scanner.nextLine() scanner.nextLine scanner String out = ""; out "" for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		} int i=0; int i=0; i 0 i<in.length() i in.length() in.length in i++ i++ i {
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		} {
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		} char c = in.charAt(i); c in.charAt(i) in.charAt in i if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			} 'a'<=c && c<='z' 'a'<=c 'a' c c<='z' c 'z' {
				c &= 0xdf;
			} c &= 0xdf c 0xdf if('A'<=c && c<='Z')
			{
				c |= 0x20;
			} 'A'<=c && c<='Z' 'A'<=c 'A' c c<='Z' c 'Z' {
				c |= 0x20;
			} c |= 0x20 c 0x20 out += String.valueOf(c) out String.valueOf(c) String.valueOf String c System.out.println(out) System.out.println System.out System System.out out String[] args args public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		String in = scanner.nextLine();
		String out = "";
		for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		}
		
		System.out.println(out);
	}
} public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		String in = scanner.nextLine();
		String out = "";
		for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		}
		
		System.out.println(out);
	}
} Main
import java.util.Scanner;

public class Main
{
	public static void main(String[] args)
	{
		Scanner scanner = new Scanner(System.in);
		
		String in = scanner.nextLine();
		String out = "";
		for(int i=0; i<in.length(); i++)
		{
			char c = in.charAt(i);
			if('a'<=c && c<='z')
			{
				c &= 0xdf;
			}
			else if('A'<=c && c<='Z')
			{
				c |= 0x20;
			}
			out += String.valueOf(c);
		}
		
		System.out.println(out);
	}
}