import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        StringBuilder s = new StringBuilder();
        
        for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            }
        String str2 = s.toString();
        System.out.println(str2);
    }
    
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        StringBuilder s = new StringBuilder();
        
        for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            }
        String str2 = s.toString();
        System.out.println(str2);
    }
    
} Main public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        StringBuilder s = new StringBuilder();
        
        for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            }
        String str2 = s.toString();
        System.out.println(str2);
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        StringBuilder s = new StringBuilder();
        
        for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            }
        String str2 = s.toString();
        System.out.println(str2);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br StringBuilder s = new StringBuilder(); s new StringBuilder() for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            } {
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            } if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        } Character.isUpperCase(str.charAt(i)) Character.isUpperCase Character str.charAt(i) str.charAt str i {
          
 s.append(Character.toLowerCase(str.charAt(i)));
        } s.append(Character.toLowerCase(str.charAt(i))) s.append s Character.toLowerCase(str.charAt(i)) Character.toLowerCase Character str.charAt(i) str.charAt str i if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        } (Character.isLowerCase(str.charAt(i))) Character.isLowerCase Character str.charAt(i) str.charAt str i {
            s.append(Character.toUpperCase(str.charAt(i)));
        } s.append(Character.toUpperCase(str.charAt(i))) s.append s Character.toUpperCase(str.charAt(i)) Character.toUpperCase Character str.charAt(i) str.charAt str i {
            s.append(str.charAt(i));
        } s.append(str.charAt(i)) s.append s str.charAt(i) str.charAt str i String str2 = s.toString(); str2 s.toString() s.toString s 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)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        StringBuilder s = new StringBuilder();
        
        for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            }
        String str2 = s.toString();
        System.out.println(str2);
    }
    
} public class Main {

    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        StringBuilder s = new StringBuilder();
        
        for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            }
        String str2 = s.toString();
        System.out.println(str2);
    }
    
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

    public static void main(String[] args)throws IOException{
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str = br.readLine();
        StringBuilder s = new StringBuilder();
        
        for(int i = 0; i < str.length(); i++){
        if(Character.isUpperCase(str.charAt(i))){
          
 s.append(Character.toLowerCase(str.charAt(i)));
        }else if((Character.isLowerCase(str.charAt(i)))){
            s.append(Character.toUpperCase(str.charAt(i)));
        }else{
            s.append(str.charAt(i));
        }
            }
        String str2 = s.toString();
        System.out.println(str2);
    }
    
}