import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;

class Main{
    private static final InputStreamReader ir = new InputStreamReader(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args) throws IOException{
        int in;
        while( (in = ir.read())!=-1){
            if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in);
        }
        out.flush();
    }
} import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io import java.util.Scanner; Scanner java.util class Main{
    private static final InputStreamReader ir = new InputStreamReader(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args) throws IOException{
        int in;
        while( (in = ir.read())!=-1){
            if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in);
        }
        out.flush();
    }
} Main private static final InputStreamReader ir = new InputStreamReader(System.in); ir new InputStreamReader(System.in) private static final PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) public static void main(String[] Args) throws IOException{
        int in;
        while( (in = ir.read())!=-1){
            if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in);
        }
        out.flush();
    } main {
        int in;
        while( (in = ir.read())!=-1){
            if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in);
        }
        out.flush();
    } int in; in while( (in = ir.read())!=-1){
            if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in);
        } (in = ir.read())!=-1 (in = ir.read()) in ir.read() ir.read ir -1 1 {
            if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in);
        } if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in); Character.isLowerCase(in) Character.isLowerCase Character in out.write(Character.toUpperCase(in)) out.write out Character.toUpperCase(in) Character.toUpperCase Character in if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in); Character.isUpperCase(in) Character.isUpperCase Character in out.write(Character.toLowerCase(in)) out.write out Character.toLowerCase(in) Character.toLowerCase Character in out.write(in) out.write out in out.flush() out.flush out String[] Args Args
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.Scanner;

class Main{
    private static final InputStreamReader ir = new InputStreamReader(System.in);
    private static final PrintWriter out = new PrintWriter(System.out);
    public static void main(String[] Args) throws IOException{
        int in;
        while( (in = ir.read())!=-1){
            if(Character.isLowerCase(in)) out.write(Character.toUpperCase(in));
            else if(Character.isUpperCase(in)) out.write(Character.toLowerCase(in));
            else out.write(in);
        }
        out.flush();
    }
}