import java.util.Scanner;

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

        String input = scanner.nextLine();

        String[] text = input.split("");
        for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        }
        System.out.println();

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

        String input = scanner.nextLine();

        String[] text = input.split("");
        for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        }
        System.out.println();

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

        String input = scanner.nextLine();

        String[] text = input.split("");
        for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        }
        System.out.println();

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

        String input = scanner.nextLine();

        String[] text = input.split("");
        for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        }
        System.out.println();

        scanner.close();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String input = scanner.nextLine(); input scanner.nextLine() scanner.nextLine scanner String[] text = input.split(""); text input.split("") input.split input "" for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        } String t text {
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        } {
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        } if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            } t.matches("[a-z]") t.matches t "[a-z]" {
                System.out.print(t.toUpperCase());
            } System.out.print(t.toUpperCase()) System.out.print System.out System System.out t.toUpperCase() t.toUpperCase t {
                System.out.print(t.toLowerCase());
            } System.out.print(t.toLowerCase()) System.out.print System.out System System.out t.toLowerCase() t.toLowerCase t System.out.println() System.out.println System.out System System.out scanner.close() scanner.close scanner String[] args args public class Main {
    public static void main(String[] args){
        Scanner scanner = new Scanner(System.in);

        String input = scanner.nextLine();

        String[] text = input.split("");
        for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        }
        System.out.println();

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

        String input = scanner.nextLine();

        String[] text = input.split("");
        for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        }
        System.out.println();

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

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

        String input = scanner.nextLine();

        String[] text = input.split("");
        for(String t : text){
            if(t.matches("[a-z]")){
                System.out.print(t.toUpperCase());
            }else{
                System.out.print(t.toLowerCase());
            }
        }
        System.out.println();

        scanner.close();
    }
}

