import static java.lang.System.*; import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class CapsLock { public static void main(String[] args) throws IOException { InputStreamReader re = new InputStreamReader(System.in); BufferedReader reader = new BufferedReader(new InputStreamReader(in)); String str = reader.readLine(); String result = ""; for(int i = 0; i < str.length(); i++){ if(Character.isUpperCase( str.charAt(i))){ String c = String.valueOf(str.charAt(i)); c = c.toLowerCase(); result += c; }else{ String c = String.valueOf(str.charAt(i)); c = c.toUpperCase(); result += c; } } System.out.println(result); } }