import java.util.Scanner;

class Main{
 
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String str = scan.nextLine();
		
		char[] c = str.toCharArray();
		
		for(int i=0; i<c.length; i++)
		{
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		}
		
		System.out.println(c);
		scan.close();
	}
} import java.util.Scanner; Scanner java.util class Main{
 
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String str = scan.nextLine();
		
		char[] c = str.toCharArray();
		
		for(int i=0; i<c.length; i++)
		{
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		}
		
		System.out.println(c);
		scan.close();
	}
} Main public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String str = scan.nextLine();
		
		char[] c = str.toCharArray();
		
		for(int i=0; i<c.length; i++)
		{
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		}
		
		System.out.println(c);
		scan.close();
	} main {

		Scanner scan = new Scanner(System.in);

		String str = scan.nextLine();
		
		char[] c = str.toCharArray();
		
		for(int i=0; i<c.length; i++)
		{
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		}
		
		System.out.println(c);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String str = scan.nextLine(); str scan.nextLine() scan.nextLine scan char[] c = str.toCharArray(); c str.toCharArray() str.toCharArray str for(int i=0; i<c.length; i++)
		{
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		} int i=0; int i=0; i 0 i<c.length i c.length c c.length i++ i++ i {
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		} {
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		} c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i] c[i] c i Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i] Character.isUpperCase(c[i]) Character.isUpperCase Character c[i] c i Character.toLowerCase(c[i]) Character.toLowerCase Character c[i] c i Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i] Character.isLowerCase(c[i]) Character.isLowerCase Character c[i] c i Character.toUpperCase(c[i]) Character.toUpperCase Character c[i] c i c[i] c i System.out.println(c) System.out.println System.out System System.out c scan.close() scan.close scan String[] args args
import java.util.Scanner;

class Main{
 
	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);

		String str = scan.nextLine();
		
		char[] c = str.toCharArray();
		
		for(int i=0; i<c.length; i++)
		{
			c[i] = Character.isUpperCase(c[i]) ? Character.toLowerCase(c[i]) : Character.isLowerCase(c[i]) ? Character.toUpperCase(c[i]) : c[i];
		}
		
		System.out.println(c);
		scan.close();
	}
}