import java.util.Scanner; public class changeUpperLower { public static void main(String[] args) { Scanner sn = new Scanner(System.in); String s = sn.next(); char[] reverse = s.toCharArray(); for (int i = 0; i < s.length(); i++) { reverse[i] = Character.isLowerCase(reverse[i]) ? Character.toUpperCase(reverse[i]) : Character.toLowerCase(reverse[i]); System.out.print(reverse[i]); } } }