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 = new char[str.length()]; for (int i = 0; i < str.length(); i++) { if (Character.isUpperCase(str.charAt(i))) { ans[i] = Character.toLowerCase(str.charAt(i)); } else { ans[i] = Character.toUpperCase(str.charAt(i)); } System.out.print(ans[i]); } } }