import java.util.Scanner; class Caps { public static void main(String[] args) { Scanner in = new Scanner(System.in); String str = in.next(); int n = str.length(); String caps = ""; for(int i = 0; i < n; i++) { if(Character.isUpperCase(str.charAt(i))) { caps += Character.toLowerCase(str.charAt(i)); } else { caps += Character.toUpperCase(str.charAt(i)); } } System.out.println(caps); } }