import java.io.*;

class Main{
    public static void main(String[] args) throws IOException
    {
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String line = br.readLine();
        char[] str = new char[line.length()];
        char c;
        for(int i = 0; i < line.length(); i++){
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        }
        String newline = new String(str);
        System.out.println(newline);
    }
} import java.io.*; io.* java class Main{
    public static void main(String[] args) throws IOException
    {
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String line = br.readLine();
        char[] str = new char[line.length()];
        char c;
        for(int i = 0; i < line.length(); i++){
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        }
        String newline = new String(str);
        System.out.println(newline);
    }
} Main public static void main(String[] args) throws IOException
    {
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String line = br.readLine();
        char[] str = new char[line.length()];
        char c;
        for(int i = 0; i < line.length(); i++){
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        }
        String newline = new String(str);
        System.out.println(newline);
    } main {
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String line = br.readLine();
        char[] str = new char[line.length()];
        char c;
        for(int i = 0; i < line.length(); i++){
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        }
        String newline = new String(str);
        System.out.println(newline);
    } InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) String line = br.readLine(); line br.readLine() br.readLine br char[] str = new char[line.length()]; str new char[line.length()] line.length() line.length line char c; c for(int i = 0; i < line.length(); i++){
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        } int i = 0; int i = 0; i 0 i < line.length() i line.length() line.length line i++ i++ i {
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        } {
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        } c = line.charAt(i) c line.charAt(i) line.charAt line i if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; } c >= 65 && c <= 90 c >= 65 c 65 c <= 90 c 90 { c += 32; } c += 32 c 32 if(c >= 97 && c <= 122){ c -= 32; } c >= 97 && c <= 122 c >= 97 c 97 c <= 122 c 122 { c -= 32; } c -= 32 c 32 str[i] = c str[i] str i c String newline = new String(str); newline new String(str) System.out.println(newline) System.out.println System.out System System.out newline String[] args args
import java.io.*;

class Main{
    public static void main(String[] args) throws IOException
    {
        InputStreamReader is = new InputStreamReader(System.in);
        BufferedReader br = new BufferedReader(is);
        String line = br.readLine();
        char[] str = new char[line.length()];
        char c;
        for(int i = 0; i < line.length(); i++){
            c = line.charAt(i);
            if(c >= 65 && c <= 90){ c += 32; }
            else if(c >= 97 && c <= 122){ c -= 32; }
            str[i] = c;
        }
        String newline = new String(str);
        System.out.println(newline);
    }
}
