import java.util.Scanner; public class Capslock { public static void main(String[] args) { Scanner s = new Scanner(System.in); StringBuilder str = new StringBuilder(s.nextLine()); s.close(); for(int i = 0;i < str.length();i++){ char c = str.charAt(i); if(Character.isUpperCase(c)){ str.setCharAt(i,Character.toLowerCase(c)); }else{ str.setCharAt(i, Character.toUpperCase(c)); } } System.out.println(str); } }