import java.util.*; class No163{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); String str = sc.next(); char[] c = str.toCharArray(); for(int i=0; i=97 && (int)c[i]<=122){ System.out.print(String.valueOf(c[i]).toUpperCase()); }else{ System.out.print(String.valueOf(c[i]).toLowerCase()); } } } }