import java.util.Scanner; public class Yuki163 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String beforeStr = scan.next(); char[] strArr = beforeStr.toCharArray(); char[] convertedArr = new char[strArr.length]; for(int i = 0; i < strArr.length; i++){ if(Character.isUpperCase(strArr[i])){ convertedArr[i] = Character.toLowerCase(strArr[i]); }else{ convertedArr[i] = Character.toUpperCase(strArr[i]); } } String afterStr = String.valueOf(convertedArr); System.out.println(afterStr); } }