import java.io.InputStreamReader;
import java.io.LineNumberReader;

/**
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_
 * 
 * @author eitatsuro
 * 
 */
public class Main {
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
        
    }
} import java.io.InputStreamReader; InputStreamReader java.io import java.io.LineNumberReader; LineNumberReader java.io public class Main {
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
        
    }
} Main private final static String SPACE = " "; SPACE " " public static void main(String[] args) {
        try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
        
    } main {
        try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
        
    } try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        } catch (Exception e) {
            System.exit(-1);
        } Exception e {
            System.exit(-1);
        } System.exit(-1) System.exit System -1 1 {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in)); lineNumReader new LineNumberReader(
                    new InputStreamReader(System.in)) String inputStr = null; inputStr null String outputStr = null; outputStr null int n = 0; n 0 int m = 0; m 0 int l = 0; l 0 long[][] a = null; a null long[][] b = null; b null while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            } (inputStr = lineNumReader.readLine()) != null (inputStr = lineNumReader.readLine()) inputStr lineNumReader.readLine() lineNumReader.readLine lineNumReader null {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            } if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                } lineNumReader.getLineNumber() == 1 lineNumReader.getLineNumber() lineNumReader.getLineNumber lineNumReader 1 {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                } StringBuilder sb = new StringBuilder(); sb new StringBuilder() char temp; temp for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    } int i=0; int i=0; i 0 i<inputStr.length() i inputStr.length() inputStr.length inputStr i++ i++ i {
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    } {
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    } temp = inputStr.charAt(i) temp inputStr.charAt(i) inputStr.charAt inputStr i if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        } Character.isUpperCase(temp) Character.isUpperCase Character temp {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } sb.append(Character.toLowerCase(temp)) sb.append sb Character.toLowerCase(temp) Character.toLowerCase Character temp if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        } Character.isLowerCase(temp) Character.isLowerCase Character temp {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } sb.append(Character.toUpperCase(temp)) sb.append sb Character.toUpperCase(temp) Character.toUpperCase Character temp {
                            sb.append(temp);
                        } sb.append(temp) sb.append sb temp outputStr = sb.toString() outputStr sb.toString() sb.toString sb if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                } lineNumReader.getLineNumber() == 1 lineNumReader.getLineNumber() lineNumReader.getLineNumber lineNumReader 1 {
                        break;
                } break; System.out.println(outputStr) System.out.println System.out System System.out outputStr lineNumReader.close() lineNumReader.close lineNumReader String[] args args public class Main {
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
        
    }
} public class Main {
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
        
    }
} Main
import java.io.InputStreamReader;
import java.io.LineNumberReader;

/**
 * http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_
 * 
 * @author eitatsuro
 * 
 */
public class Main {
    private final static String SPACE = " ";
    
    public static void main(String[] args) {
        try {
            LineNumberReader lineNumReader = new LineNumberReader(
                    new InputStreamReader(System.in));
            
            String inputStr = null;
            String outputStr = null;
            int n = 0;
            int m = 0;
            int l = 0;
            long[][] a = null;
            long[][] b = null;
            while ((inputStr = lineNumReader.readLine()) != null) {
                
                // ????????????????????????
                if (lineNumReader.getLineNumber() == 1) {

                    StringBuilder sb = new StringBuilder();
                    char temp;
                    for (int i=0; i<inputStr.length(); i++){
                        temp = inputStr.charAt(i);
                        // ??§?????????????°????????????????
                        if (Character.isUpperCase(temp)) {
                            sb.append(Character.toLowerCase(temp));
                        // ?°???????????????§???????????????
                        } else if (Character.isLowerCase(temp)) {
                            sb.append(Character.toUpperCase(temp));
                        // ????????\????????????????????????
                        } else {
                            sb.append(temp);
                        }
                    }
                    outputStr = sb.toString();
                }

                if (lineNumReader.getLineNumber() == 1 ) {
                        break;
                }
            }

            // ??¢???????????????
            System.out.println(outputStr);

            lineNumReader.close();
        } catch (Exception e) {
            System.exit(-1);
        }
        
    }
}