import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); String s = scanner.next(); StringBuilder builder = new StringBuilder(); for (char c : s.toCharArray()) { if (Character.isUpperCase(c)) { builder.append(String.valueOf(c).toLowerCase()); } else { builder.append(String.valueOf(c).toUpperCase()); } } System.out.println(builder.toString()); } }