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++) { if (Character.isLowerCase(reverse[i])) { reverse[i] = Character.toUpperCase(reverse[i]); } else { reverse[i] = Character.toLowerCase(reverse[i]); } System.out.print(reverse[i]); } } }