import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] input = sc.next().toCharArray(); sc.close(); for (int i = 0; i < input.length; i++) { if (Character.isUpperCase(input[i])) { System.out.print(Character.toLowerCase(input[i])); } else { System.out.print(Character.toUpperCase(input[i])); } } System.out.println(); } }