import java.util.Scanner; public class No163 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String passward = sc.next(); for(int i = 0;i < passward.length();i++) { if(Character.isUpperCase(passward.charAt(i))) { System.out.print(Character.toLowerCase(passward.charAt(i))); }else { System.out.print(Character.toUpperCase(passward.charAt(i))); } } System.out.println(); } }