import java.util.*;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        }
        String str2 = String.valueOf(chars);
        System.out.println(str2);
    }
}
 import java.util.*; util.* java public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        }
        String str2 = String.valueOf(chars);
        System.out.println(str2);
    }
} Main public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        }
        String str2 = String.valueOf(chars);
        System.out.println(str2);
    } main {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        }
        String str2 = String.valueOf(chars);
        System.out.println(str2);
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String str = sc.nextLine(); str sc.nextLine() sc.nextLine sc char[] chars = str.toCharArray(); chars str.toCharArray() str.toCharArray str for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        } int i=0; int i=0; i 0 i<str.length() i str.length() str.length str i++ i++ i {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        } {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        } if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]); 'a'<=chars[i]&&chars[i]<='z' 'a'<=chars[i] 'a' chars[i] chars i chars[i]<='z' chars[i] chars i 'z' chars[i]= Character.toUpperCase(chars[i]) chars[i] chars i Character.toUpperCase(chars[i]) Character.toUpperCase Character chars[i] chars i if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]); 'A'<=chars[i]&&chars[i]<='Z' 'A'<=chars[i] 'A' chars[i] chars i chars[i]<='Z' chars[i] chars i 'Z' chars[i]= Character.toLowerCase(chars[i]) chars[i] chars i Character.toLowerCase(chars[i]) Character.toLowerCase Character chars[i] chars i String str2 = String.valueOf(chars); str2 String.valueOf(chars) String.valueOf String chars System.out.println(str2) System.out.println System.out System System.out str2 String[] args args public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        }
        String str2 = String.valueOf(chars);
        System.out.println(str2);
    }
} public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        }
        String str2 = String.valueOf(chars);
        System.out.println(str2);
    }
} Main
import java.util.*;

public class Main{      
    public static void main(String[] args)
    {
        Scanner sc = new Scanner(System.in);
        
        String str = sc.nextLine();
        char[] chars = str.toCharArray();
        for (int i=0;i<str.length();i++) {
            if('a'<=chars[i]&&chars[i]<='z')
                chars[i]= Character.toUpperCase(chars[i]);
            else if('A'<=chars[i]&&chars[i]<='Z')
                chars[i]= Character.toLowerCase(chars[i]);
        }
        String str2 = String.valueOf(chars);
        System.out.println(str2);
    }
}

