import java.util.Scanner;

import static java.lang.Character.*;

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

        String input = sc.nextLine();

        char[] output = new char[input.length()];

        for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        }

        System.out.println(output);

        sc.close();
    }
} import java.util.Scanner; Scanner java.util import static java.lang.Character.*; import static java.lang.Character.*; import static java.lang.Character.*; public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();

        char[] output = new char[input.length()];

        for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        }

        System.out.println(output);

        sc.close();
    }
} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();

        char[] output = new char[input.length()];

        for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        }

        System.out.println(output);

        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();

        char[] output = new char[input.length()];

        for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        }

        System.out.println(output);

        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String input = sc.nextLine(); input sc.nextLine() sc.nextLine sc char[] output = new char[input.length()]; output new char[input.length()] input.length() input.length input for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        } int i = 0; int i = 0; i 0 i < input.length() i input.length() input.length input i++ i++ i {
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        } {
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        } if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i); isLowerCase(input.charAt(i)) isLowerCase input.charAt(i) input.charAt input i output[i] = toUpperCase(input.charAt(i)) output[i] output i toUpperCase(input.charAt(i)) toUpperCase input.charAt(i) input.charAt input i if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i); isUpperCase(input.charAt(i)) isUpperCase input.charAt(i) input.charAt input i output[i] = toLowerCase(input.charAt(i)) output[i] output i toLowerCase(input.charAt(i)) toLowerCase input.charAt(i) input.charAt input i output[i] = input.charAt(i) output[i] output i input.charAt(i) input.charAt input i System.out.println(output) System.out.println System.out System System.out output sc.close() sc.close sc String[] args args public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();

        char[] output = new char[input.length()];

        for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        }

        System.out.println(output);

        sc.close();
    }
} public class Main {
    public static void main(String[] args){
        Scanner sc = new Scanner(System.in);

        String input = sc.nextLine();

        char[] output = new char[input.length()];

        for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        }

        System.out.println(output);

        sc.close();
    }
} Main
import java.util.Scanner;

import static java.lang.Character.*;

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

        String input = sc.nextLine();

        char[] output = new char[input.length()];

        for(int i = 0; i < input.length(); i++){
            if(isLowerCase(input.charAt(i)))
                output[i] = toUpperCase(input.charAt(i));
            else if(isUpperCase(input.charAt(i)))
                output[i] = toLowerCase(input.charAt(i));
            else output[i] = input.charAt(i);
        }

        System.out.println(output);

        sc.close();
    }
}
