import java.util.*; public class Main { 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++) { String c = String.valueOf(s.charAt(i)); if(c.equals(c.toUpperCase())) { ans += c.toLowerCase(); } else { ans += c.toUpperCase(); } } System.out.println(ans); } }