import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		// ?????????????????\???
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();

		// ??\?????????????????????char????????????
		char [] sentence = input.toCharArray();

		for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		}

		sc.close();

		String output = String.valueOf(sentence);
		System.out.println(output);

	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {

		// ?????????????????\???
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();

		// ??\?????????????????????char????????????
		char [] sentence = input.toCharArray();

		for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		}

		sc.close();

		String output = String.valueOf(sentence);
		System.out.println(output);

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

		// ?????????????????\???
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();

		// ??\?????????????????????char????????????
		char [] sentence = input.toCharArray();

		for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		}

		sc.close();

		String output = String.valueOf(sentence);
		System.out.println(output);

	} main {

		// ?????????????????\???
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();

		// ??\?????????????????????char????????????
		char [] sentence = input.toCharArray();

		for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		}

		sc.close();

		String output = String.valueOf(sentence);
		System.out.println(output);

	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc char [] sentence = input.toCharArray(); sentence input.toCharArray() input.toCharArray input for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		} int cnt=0; int cnt=0; cnt 0 cnt< sentence.length cnt sentence.length sentence sentence.length cnt++ cnt++ cnt {

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		} {

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		} if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			} Character.isUpperCase(sentence[cnt]) Character.isUpperCase Character sentence[cnt] sentence cnt {

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			} sentence[cnt] = Character.toLowerCase(sentence[cnt]) sentence[cnt] sentence cnt Character.toLowerCase(sentence[cnt]) Character.toLowerCase Character sentence[cnt] sentence cnt {

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			} sentence[cnt]=Character.toUpperCase(sentence[cnt]) sentence[cnt] sentence cnt Character.toUpperCase(sentence[cnt]) Character.toUpperCase Character sentence[cnt] sentence cnt sc.close() sc.close sc String output = String.valueOf(sentence); output String.valueOf(sentence) String.valueOf String sentence System.out.println(output) System.out.println System.out System System.out output String[] args args public class Main {

	public static void main(String[] args) {

		// ?????????????????\???
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();

		// ??\?????????????????????char????????????
		char [] sentence = input.toCharArray();

		for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		}

		sc.close();

		String output = String.valueOf(sentence);
		System.out.println(output);

	}
} public class Main {

	public static void main(String[] args) {

		// ?????????????????\???
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();

		// ??\?????????????????????char????????????
		char [] sentence = input.toCharArray();

		for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		}

		sc.close();

		String output = String.valueOf(sentence);
		System.out.println(output);

	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		// ?????????????????\???
		Scanner sc = new Scanner(System.in);
		String input = sc.nextLine();

		// ??\?????????????????????char????????????
		char [] sentence = input.toCharArray();

		for(int cnt=0; cnt< sentence.length; cnt++){

			if (Character.isUpperCase(sentence[cnt])){

				sentence[cnt] = Character.toLowerCase(sentence[cnt]);

			}else{

				sentence[cnt]=Character.toUpperCase(sentence[cnt]);

			}
		}

		sc.close();

		String output = String.valueOf(sentence);
		System.out.println(output);

	}
}