import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n,i;
        char c;
        String str;
        str=scan.nextLine();
        n=str.length();
        for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        }
        System.out.println("");
    }
} import java.util.Scanner; Scanner java.util public class Main {

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n,i;
        char c;
        String str;
        str=scan.nextLine();
        n=str.length();
        for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        }
        System.out.println("");
    }
} Main public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n,i;
        char c;
        String str;
        str=scan.nextLine();
        n=str.length();
        for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        }
        System.out.println("");
    } main {
        Scanner scan=new Scanner(System.in);
        int n,i;
        char c;
        String str;
        str=scan.nextLine();
        n=str.length();
        for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        }
        System.out.println("");
    } Scanner scan=new Scanner(System.in); scan new Scanner(System.in) int n n i; i char c; c String str; str str=scan.nextLine() str scan.nextLine() scan.nextLine scan n=str.length() n str.length() str.length str for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        } i=0; i=0 i 0 i<n i n i++ i++ i {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        } {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        } if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	} Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	} System.out.print(Character.toLowerCase(str.charAt(i))) System.out.print System.out System System.out Character.toLowerCase(str.charAt(i)) Character.toLowerCase Character str.charAt(i) str.charAt str i if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	} Character.isLowerCase(str.charAt(i)) Character.isLowerCase Character str.charAt(i) str.charAt str i {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	} System.out.print(Character.toUpperCase(str.charAt(i))) System.out.print System.out System System.out Character.toUpperCase(str.charAt(i)) Character.toUpperCase Character str.charAt(i) str.charAt str i {
        		System.out.print(str.charAt(i));
        	} System.out.print(str.charAt(i)) System.out.print System.out System System.out str.charAt(i) str.charAt str i System.out.println("") System.out.println System.out System System.out "" String[] args args public class Main {

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n,i;
        char c;
        String str;
        str=scan.nextLine();
        n=str.length();
        for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        }
        System.out.println("");
    }
} public class Main {

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n,i;
        char c;
        String str;
        str=scan.nextLine();
        n=str.length();
        for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        }
        System.out.println("");
    }
} Main
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int n,i;
        char c;
        String str;
        str=scan.nextLine();
        n=str.length();
        for(i=0;i<n;i++) {
        	if(Character.isUpperCase(str.charAt(i))) {
        		System.out.print(Character.toLowerCase(str.charAt(i)));
        	}
        	else if(Character.isLowerCase(str.charAt(i))) {
        		System.out.print(Character.toUpperCase(str.charAt(i)));
        	}
        	else {
        		System.out.print(str.charAt(i));
        	}
        }
        System.out.println("");
    }
}
