#K50547. Schedule Notifications

    ID: 28888 Type: Default 1000ms 256MiB

Schedule Notifications

Schedule Notifications

Given a weekly schedule of events and the current day, your task is to extract the event descriptions that occur on the current day and the following day. The days of the week are considered in the order $$Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday$$, and note that the day following $$Sunday$$ is $$Monday$$. Each event in the schedule is described by the day, a start time, an end time, and a brief description.

You are required to read the input from stdin and output the matching event descriptions in the order they appear in the schedule. If no events occur on the current or the next day, output nothing.

inputFormat

The input is provided via standard input (stdin) and has the following format:

  1. A single line containing the current day of the week (e.g., $$Monday$$).
  2. A single line containing an integer $$n$$ indicating the number of scheduled events.
  3. $$n$$ lines follow, each describing an event using space-separated values in the following format:
day start_time end_time description

For each event:
- day: A day of the week (e.g., $$Tuesday$$).
- start_time and end_time: Times in the format $$HH:MM$$.
- description: A string (which may contain spaces) describing the event.

outputFormat

The output should be printed to standard output (stdout). Print the event descriptions for events that occur on the current day or the next day, each on a new line. If no such events exist, print nothing.

## sample
Monday
3
Monday 14:30 16:00 Team Meeting
Tuesday 09:00 10:00 Doctor Appointment
Wednesday 18:00 19:30 Workout Session
Team Meeting

Doctor Appointment

</p>