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

public class Main {

	public static void main(String[] args)throws IOException 
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		System.out.println(sb.toString());
	}
} 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 br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		System.out.println(sb.toString());
	}
} Main public static void main(String[] args)throws IOException 
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		System.out.println(sb.toString());
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		System.out.println(sb.toString());
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) StringBuilder sb = new StringBuilder(); sb new StringBuilder() sb.append(br.readLine()) sb.append sb br.readLine() br.readLine br for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		} int i=0; int i=0; i 0 i<sb.length() i sb.length() sb.length sb i++ i++ i {
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		} {
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		} char chk = sb.charAt(i); chk sb.charAt(i) sb.charAt sb i if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			} Character.isUpperCase(chk) Character.isUpperCase Character chk {
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			} chk = Character.toLowerCase(chk) chk Character.toLowerCase(chk) Character.toLowerCase Character chk sb.setCharAt(i, chk) sb.setCharAt sb i chk if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			} Character.isLowerCase(chk) Character.isLowerCase Character chk {
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			} chk = Character.toUpperCase(chk) chk Character.toUpperCase(chk) Character.toUpperCase Character chk sb.setCharAt(i, chk) sb.setCharAt sb i chk System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args public class Main {

	public static void main(String[] args)throws IOException 
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		System.out.println(sb.toString());
	}
} public class Main {

	public static void main(String[] args)throws IOException 
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		System.out.println(sb.toString());
	}
} 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 br = new BufferedReader(new InputStreamReader(System.in));
		StringBuilder sb = new StringBuilder();
		sb.append(br.readLine());
		
		for(int i=0; i<sb.length(); i++)
		{
			char chk = sb.charAt(i);
			if(Character.isUpperCase(chk))
			{
				chk = Character.toLowerCase(chk);
				sb.setCharAt(i, chk);
			}
			else if(Character.isLowerCase(chk))
			{
				chk = Character.toUpperCase(chk);
				sb.setCharAt(i, chk);
			}
		}
		System.out.println(sb.toString());
	}
}