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