import java.util.Locale;

public class Chapter03Conditionals {
    public static String respond(String input) {
        String command = input.strip().toLowerCase(Locale.ROOT);
        return switch (command) {
            case "hi" -> "Hello! How can I help?";
            case "help" -> "Commands: hi, tip, and exit.";
            case "tip" -> "Use names that reveal intent.";
            case "exit" -> "See you soon!";
            default -> "I did not understand. Type help.";
        };
    }

    public static void main(String[] args) {
        System.out.println(respond("  HELP  "));
    }
}
