Most crashed device model
Your task
A crash-reporting service stores one line per crash as "<device_model> <os_version>", for example "pixel8 14". Product wants to know which device model is generating the most crash reports. Given at least one line, return the model with the highest number of reports; if several models tie, return the alphabetically smallest model name. The OS version is irrelevant to the count, every line is one crash for its model.
Examples
crashiest_model(lines: list[str]) -> strExample 1
Input
crashiest_model(["pixel8 14", "iphone15 17", "pixel8 15"])Output
"pixel8"