import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] list = scanner.nextLine().toCharArray();
        for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a));
        System.out.println();
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] list = scanner.nextLine().toCharArray();
        for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a));
        System.out.println();
    }
} Main public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] list = scanner.nextLine().toCharArray();
        for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a));
        System.out.println();
    } main {
        Scanner scanner = new Scanner(System.in);
        char[] list = scanner.nextLine().toCharArray();
        for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a));
        System.out.println();
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) char[] list = scanner.nextLine().toCharArray(); list scanner.nextLine().toCharArray() scanner.nextLine().toCharArray scanner.nextLine() scanner.nextLine scanner for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a)); char a list if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a)); if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a)); Character.isLowerCase(a) Character.isLowerCase Character a System.out.print(Character.toUpperCase(a)) System.out.print System.out System System.out Character.toUpperCase(a) Character.toUpperCase Character a System.out.print(Character.toLowerCase(a)) System.out.print System.out System System.out Character.toLowerCase(a) Character.toLowerCase Character a System.out.println() System.out.println System.out System System.out String[] args args public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] list = scanner.nextLine().toCharArray();
        for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a));
        System.out.println();
    }
} public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] list = scanner.nextLine().toCharArray();
        for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a));
        System.out.println();
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        char[] list = scanner.nextLine().toCharArray();
        for(char a:list)
            if(Character.isLowerCase(a))
                System.out.print(Character.toUpperCase(a));
            else
                System.out.print(Character.toLowerCase(a));
        System.out.println();
    }
}
