import java.util.Scanner; public class Exercises6{ public static void main (String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); char[] chars = new char[str.length()]; String newStr; for(int n = 0; n < str.length(); n++){ char c = str.charAt(n); if (Character.isUpperCase(c)){ char newC = Character.toLowerCase(c); chars[n] = newC; }else{ char newC = Character.toUpperCase(c); chars[n] = newC; } } newStr = new String(chars); System.out.println(newStr); } }