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

public class Main {
	public static final String EOL = System.getProperty("line.separator");
    public void exec() throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	PrintWriter out = new PrintWriter(System.out);
    	char[] cbuf = new char[1200];
    	int len = br.read(cbuf);
    	for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	}
    	out.print(new String(cbuf,0,len));
        out.flush();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.PrintWriter; PrintWriter java.io public class Main {
	public static final String EOL = System.getProperty("line.separator");
    public void exec() throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	PrintWriter out = new PrintWriter(System.out);
    	char[] cbuf = new char[1200];
    	int len = br.read(cbuf);
    	for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	}
    	out.print(new String(cbuf,0,len));
        out.flush();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }
} Main public static final String EOL = System.getProperty("line.separator"); EOL System.getProperty("line.separator") System.getProperty System "line.separator" public void exec() throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	PrintWriter out = new PrintWriter(System.out);
    	char[] cbuf = new char[1200];
    	int len = br.read(cbuf);
    	for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	}
    	out.print(new String(cbuf,0,len));
        out.flush();
    } exec {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	PrintWriter out = new PrintWriter(System.out);
    	char[] cbuf = new char[1200];
    	int len = br.read(cbuf);
    	for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	}
    	out.print(new String(cbuf,0,len));
        out.flush();
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) char[] cbuf = new char[1200]; cbuf new char[1200] 1200 int len = br.read(cbuf); len br.read(cbuf) br.read br cbuf for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	} int i=0; int i=0; i 0 i<len i len i++ i++ i {
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	} {
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	} char c = cbuf[i]; c cbuf[i] cbuf i if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		} 'A' <= c && c <= 'Z' 'A' <= c 'A' c c <= 'Z' c 'Z' {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		} c -= 'A' c 'A' c += 'a' c 'a' cbuf[i] = c cbuf[i] cbuf i c if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		} 'a' <= c && c <= 'z' 'a' <= c 'a' c c <= 'z' c 'z' {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		} c -= 'a' c 'a' c += 'A' c 'A' cbuf[i] = c cbuf[i] cbuf i c out.print(new String(cbuf,0,len)) out.print out new String(cbuf,0,len) out.flush() out.flush out public static void main(String[] args) throws IOException {
    	new Main().exec();
    } main {
    	new Main().exec();
    } new Main().exec() new Main().exec new Main() String[] args args public class Main {
	public static final String EOL = System.getProperty("line.separator");
    public void exec() throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	PrintWriter out = new PrintWriter(System.out);
    	char[] cbuf = new char[1200];
    	int len = br.read(cbuf);
    	for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	}
    	out.print(new String(cbuf,0,len));
        out.flush();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }
} public class Main {
	public static final String EOL = System.getProperty("line.separator");
    public void exec() throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	PrintWriter out = new PrintWriter(System.out);
    	char[] cbuf = new char[1200];
    	int len = br.read(cbuf);
    	for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	}
    	out.print(new String(cbuf,0,len));
        out.flush();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class Main {
	public static final String EOL = System.getProperty("line.separator");
    public void exec() throws IOException {
    	BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    	PrintWriter out = new PrintWriter(System.out);
    	char[] cbuf = new char[1200];
    	int len = br.read(cbuf);
    	for (int i=0; i<len; i++){
    		char c = cbuf[i];
    		if('A' <= c && c <= 'Z') {
    			c -= 'A';
    			c += 'a';
    			cbuf[i] = c;
    		}else if ('a' <= c && c <= 'z') {
    			c -= 'a';
    			c += 'A';
    			cbuf[i] = c;
    		}
    	}
    	out.print(new String(cbuf,0,len));
        out.flush();
    }
 
    public static void main(String[] args) throws IOException {
    	new Main().exec();
    }
}