import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); String s = sc.next(); char[] charS = s.toCharArray(); for(int i = 0; i < s.length(); i++) { if(String.valueOf(charS[i]).equals(String.valueOf(charS[i]).toUpperCase())) { charS[i] = String.valueOf(charS[i]).toLowerCase().charAt(0); } else { charS[i] = String.valueOf(charS[i]).toUpperCase().charAt(0); } } for(int i = 0; i < s.length(); i++) { System.out.print(charS[i]); } System.out.println(); } }