You are given n log lines. Each line begins with a timestamp in 24-hour HH:MM:SS format (exactly 8 characters), optionally followed by a single space and a free-form message (the message may be empty, any characters, or absent entirely). Seconds are ignored for bucketing purposes: convert each timestamp to minutes-since-midnight (HH*60+MM) and assign it to the bucket floor(minutes / B), where B is a bucket size in minutes given on the first line. B is guaranteed to evenly divide 1440 (the number of minutes in a day).
For every bucket that has at least one log line (only buckets that actually occur — not every possible bucket of the day), print one line: HH:MM-HH:MM: count, where the range is the bucket's [start, start+B) window formatted as 24-hour HH:MM, and count is the number of log lines that fall in it. A bucket whose window ends exactly at midnight is written with an end time of 24:00 (not 00:00). Print the buckets in ascending order of their start time.
Input format
Line 1: two integers n and B, space-separated.
Lines 2..n+1: each a log line starting with HH:MM:SS.
Output format
One line per non-empty bucket, ascending, formatted as described above.
Constraints
- 1 ≤ n ≤ 300
Bevenly divides 1440, 1 ≤ B ≤ 1440- each timestamp has HH in 00–23, MM and SS in 00–59