import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.*; io.* java import java.util.*; util.* java public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    }
} Main public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    } main {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br StringBuilder sb = new StringBuilder(); sb new StringBuilder() for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        } int i=0; int i=0; i 0 i<line.length() i line.length() line.length line i++ i++ i {
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        } {
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        } if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            } Character.isLowerCase(line.charAt(i)) Character.isLowerCase Character line.charAt(i) line.charAt line i {
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            } sb.append(String.valueOf(line.charAt(i)).toUpperCase()) sb.append sb String.valueOf(line.charAt(i)).toUpperCase() String.valueOf(line.charAt(i)).toUpperCase String.valueOf(line.charAt(i)) String.valueOf String line.charAt(i) line.charAt line i {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            } sb.append(String.valueOf(line.charAt(i)).toLowerCase()) sb.append sb String.valueOf(line.charAt(i)).toLowerCase() String.valueOf(line.charAt(i)).toLowerCase String.valueOf(line.charAt(i)) String.valueOf String line.charAt(i) line.charAt line i System.out.println(sb.toString()) System.out.println System.out System System.out sb.toString() sb.toString sb String[] args args public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    }
} public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.*;
import java.util.*;
public class Main {
    public static void main(String[] args) throws Exception {
        // Here your code !
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String line = br.readLine();
        StringBuilder sb = new StringBuilder();
        for(int i=0;i<line.length();i++){
            if(Character.isLowerCase(line.charAt(i))){
                sb.append(String.valueOf(line.charAt(i)).toUpperCase());
            }else {
                sb.append(String.valueOf(line.charAt(i)).toLowerCase());
            }
        }
        System.out.println(sb.toString());
    }
}