import java.util.Scanner;

public class Main {


    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		}
		//????§????
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {


    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		}
		//????§????
		scan.close();
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		}
		//????§????
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);

		while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		}
		//????§????
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		} true {
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		} String moji = scan.next(); moji scan.next() scan.next scan int moji_len = moji.length(); moji_len moji.length() moji.length moji for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			} int cnt_len = 0; int cnt_len = 0; cnt_len 0 cnt_len < moji_len cnt_len moji_len cnt_len++ cnt_len++ cnt_len {
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			} {
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			} char moji_one = moji.charAt(cnt_len); moji_one moji.charAt(cnt_len) moji.charAt moji cnt_len if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one)); Character.isLowerCase(moji_one) Character.isLowerCase Character moji_one System.out.print(Character.toUpperCase(moji_one)) System.out.print System.out System System.out Character.toUpperCase(moji_one) Character.toUpperCase Character moji_one System.out.print(Character.toLowerCase(moji_one)) System.out.print System.out System System.out Character.toLowerCase(moji_one) Character.toLowerCase Character moji_one if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			} scan.hasNext() scan.hasNext scan System.out.print(" ") System.out.print System.out System System.out " " {
				System.out.print("\n");
				break;
			} System.out.print("\n") System.out.print System.out System System.out "\n" break; scan.close() scan.close scan String[] args args public class Main {


    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		}
		//????§????
		scan.close();
	}
} public class Main {


    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		}
		//????§????
		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {


    public static void main(String[] args){
		Scanner scan = new Scanner(System.in);

		while(true){
			String moji = scan.next();
			int moji_len = moji.length();
			for(int cnt_len = 0; cnt_len < moji_len; cnt_len++){
				char moji_one = moji.charAt(cnt_len);
				if(Character.isLowerCase(moji_one))
					System.out.print(Character.toUpperCase(moji_one));
				else
					System.out.print(Character.toLowerCase(moji_one));
			}
			//?????????????´???§???????????°?????????????????\??????
			if(scan.hasNext())
				System.out.print(" ");
			else{
				System.out.print("\n");
				break;
			}
		}
		//????§????
		scan.close();
	}
}