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