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


public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		}
		System.out.println();
	}

} 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 {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		}
		System.out.println();
	}

} Main public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		}
		System.out.println();
	} main {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		}
		System.out.println();
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		} char c line.toCharArray() line.toCharArray line {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		} {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		} if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			} Character.isLowerCase(c) Character.isLowerCase Character c {
				System.out.print(Character.toUpperCase(c));
			} System.out.print(Character.toUpperCase(c)) System.out.print System.out System System.out Character.toUpperCase(c) Character.toUpperCase Character c {
				System.out.print(Character.toLowerCase(c));
			} System.out.print(Character.toLowerCase(c)) System.out.print System.out System System.out Character.toLowerCase(c) Character.toLowerCase Character c System.out.println() System.out.println System.out System System.out String[] args args public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		}
		System.out.println();
	}

} public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		}
		System.out.println();
	}

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


public class Main{

	public static void main(String[] args) throws IOException {
		// TODO Auto-generated method stub
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
		for (char c : line.toCharArray()) {
			if (Character.isLowerCase(c)) {
				System.out.print(Character.toUpperCase(c));
			} else {
				System.out.print(Character.toLowerCase(c));
			}
		}
		System.out.println();
	}

}