import java.util.Scanner; public class Test { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(), ans = ""; for(int i = 0; i < s.length(); i++){ if(s.charAt(i) >= 'a'){ ans += s.charAt(i)-'a'+'A'; } else { ans += s.charAt(i)-'A'+'a'; } } System.out.println(ans); } }