import java.util.Scanner; class Wandbox { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); String ans = ""; for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); if (Character.isLowerCase(c)) { ans += Character.toUpperCase(c); } else { ans += Character.toLowerCase(c); } } System.out.println(ans); } }