import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { new Main().run(); } private void run() throws IOException { Scanner scanner = new Scanner(System.in); String str = scanner.next(); str.chars() .mapToObj(i -> (char) i) .map(s -> s >= 'a' ? Character.toUpperCase(s) : Character .toLowerCase(s)).forEach(System.out::print); System.out.println(); } }