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