import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		String input;
		StringBuilder output = new StringBuilder();
		int offset = 32;
		
		//データの入力
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		
		//文字列を1文字ずつ変換
		for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		}
		
		System.out.println(output.toString());
	}
} import java.util.Scanner; Scanner java.util public class Main{
	public static void main(String[] args){
		String input;
		StringBuilder output = new StringBuilder();
		int offset = 32;
		
		//データの入力
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		
		//文字列を1文字ずつ変換
		for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		}
		
		System.out.println(output.toString());
	}
} Main public static void main(String[] args){
		String input;
		StringBuilder output = new StringBuilder();
		int offset = 32;
		
		//データの入力
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		
		//文字列を1文字ずつ変換
		for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		}
		
		System.out.println(output.toString());
	} main {
		String input;
		StringBuilder output = new StringBuilder();
		int offset = 32;
		
		//データの入力
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		
		//文字列を1文字ずつ変換
		for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		}
		
		System.out.println(output.toString());
	} String input; input StringBuilder output = new StringBuilder(); output new StringBuilder() int offset = 32; offset 32 Scanner sc = new Scanner(System.in); sc new Scanner(System.in) input = sc.nextLine() input sc.nextLine() sc.nextLine sc for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		} int i = 0; int i = 0; i 0 i < input.length() i input.length() input.length input i++ i++ i {
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		} {
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		} int temp = input.charAt(i); temp input.charAt(i) input.charAt input i if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			} 65 <= temp && temp <= 90 65 <= temp 65 temp temp <= 90 temp 90 {
				temp += offset;
			} temp += offset temp offset if (97 <= temp && temp <= 122){
				temp -= offset;
			} 97 <= temp && temp <= 122 97 <= temp 97 temp temp <= 122 temp 122 {
				temp -= offset;
			} temp -= offset temp offset output.append((char)temp) output.append output (char)temp System.out.println(output.toString()) System.out.println System.out System System.out output.toString() output.toString output String[] args args public class Main{
	public static void main(String[] args){
		String input;
		StringBuilder output = new StringBuilder();
		int offset = 32;
		
		//データの入力
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		
		//文字列を1文字ずつ変換
		for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		}
		
		System.out.println(output.toString());
	}
} public class Main{
	public static void main(String[] args){
		String input;
		StringBuilder output = new StringBuilder();
		int offset = 32;
		
		//データの入力
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		
		//文字列を1文字ずつ変換
		for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		}
		
		System.out.println(output.toString());
	}
} Main
import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		String input;
		StringBuilder output = new StringBuilder();
		int offset = 32;
		
		//データの入力
		Scanner sc = new Scanner(System.in);
		input = sc.nextLine();
		
		//文字列を1文字ずつ変換
		for (int i = 0; i < input.length(); i++){
			int temp = input.charAt(i);
			
			if (65 <= temp && temp <= 90){
				temp += offset;
			}else if (97 <= temp && temp <= 122){
				temp -= offset;
			}
			
			output.append((char)temp);
		}
		
		System.out.println(output.toString());
	}
}
