import java.util.Scanner; public class Main_yukicoder163 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); char[] passwd = sc.next().toCharArray(); for (int i = 0; i < passwd.length; i++) { if (passwd[i] >= 'A' && passwd[i] <= 'Z') { System.out.print((char)(passwd[i] - 'A' + 'a')); } else { System.out.print((char)(passwd[i] - 'a' + 'A')); } } System.out.println(""); sc.close(); } }