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