Extract error messages
Your task
You are building a tiny report generator for a cron runner's log. Each line is "<timestamp> <LEVEL> <message>", and the message itself may contain several words. Extract the messages of all lines whose level token (the second token) is exactly "ERROR": return just the message texts, timestamp and level stripped, in the order the lines appear. A word like "ERROR" inside some other line's message must not cause that line to be included.
Examples
error_messages(lines: list[str]) -> list[str]Example 1
Input
error_messages(["t1 ERROR disk full", "t2 INFO rotation done", "t3 ERROR net down"])Output
["disk full", "net down"]