import java.io.IOException; import java.io.BufferedReader; import java.io.InputStreamReader; class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); StringBuilder sb = new StringBuilder(); for (char c : line.toCharArray()) { if (Character.isLowerCase(c)) { sb.append(Character.toUpperCase(c)); } else { sb.append(Character.toLowerCase(c)); } } System.out.println(sb.toString()); } }