import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int alfa = 32;
		String line, ans; char[] lineC;
		
		ans = "";
		line = in.nextLine();
		lineC = line.toCharArray();
		
		for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		}
		
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int alfa = 32;
		String line, ans; char[] lineC;
		
		ans = "";
		line = in.nextLine();
		lineC = line.toCharArray();
		
		for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		}
		
		System.out.println(ans);
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int alfa = 32;
		String line, ans; char[] lineC;
		
		ans = "";
		line = in.nextLine();
		lineC = line.toCharArray();
		
		for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		}
		
		System.out.println(ans);
	} main {
		Scanner in = new Scanner(System.in);
		int alfa = 32;
		String line, ans; char[] lineC;
		
		ans = "";
		line = in.nextLine();
		lineC = line.toCharArray();
		
		for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		}
		
		System.out.println(ans);
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int alfa = 32; alfa 32 String line line ans; ans char[] lineC; lineC ans = "" ans "" line = in.nextLine() line in.nextLine() in.nextLine in lineC = line.toCharArray() lineC line.toCharArray() line.toCharArray line for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		} int i=0; int i=0; i 0 i<lineC.length i lineC.length lineC lineC.length i++ i++ i {
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		} {
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		} if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i]; Character.isUpperCase(lineC[i]) Character.isUpperCase Character lineC[i] lineC i ans += (char)(lineC[i] + alfa) ans (char)(lineC[i] + alfa) lineC[i] lineC i alfa if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i]; Character.isLowerCase(lineC[i]) Character.isLowerCase Character lineC[i] lineC i ans += (char)(lineC[i] - alfa) ans (char)(lineC[i] - alfa) lineC[i] lineC i alfa ans += lineC[i] ans lineC[i] lineC i System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int alfa = 32;
		String line, ans; char[] lineC;
		
		ans = "";
		line = in.nextLine();
		lineC = line.toCharArray();
		
		for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		}
		
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int alfa = 32;
		String line, ans; char[] lineC;
		
		ans = "";
		line = in.nextLine();
		lineC = line.toCharArray();
		
		for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		}
		
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int alfa = 32;
		String line, ans; char[] lineC;
		
		ans = "";
		line = in.nextLine();
		lineC = line.toCharArray();
		
		for(int i=0;i<lineC.length;i++){
			if(Character.isUpperCase(lineC[i]))
				ans += (char)(lineC[i] + alfa);
			else if(Character.isLowerCase(lineC[i]))
				ans += (char)(lineC[i] - alfa);
			else ans += lineC[i];
		}
		
		System.out.println(ans);
	}
}