import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] arr = sc.next().toCharArray(); for (int i = 0; i < arr.length; i++) { if (arr[i] >= 'a' && arr[i] <= 'z') { arr[i] += 'A' - 'a'; } else { arr[i] += 'a' - 'A'; } } System.out.println(arr); } }