#K77967. Medal Distribution
Medal Distribution
Medal Distribution
You are given the completion times for \( n \) participants in a race. Each time is given in the format \( HH:MM:SS \). Your task is to assign a medal to each participant based on their performance:
- The fastest (smallest time) receives the Gold medal.
- The second fastest receives the Silver medal.
- The third fastest receives the Bronze medal.
- If two or more participants have the identical time, they will receive the same medal. In addition, if more than three distinct finishing times occur, all participants ranked lower than third will also receive the Bronze medal.
Note that the output must list the medal awarded for each participant in the same order as the input positions.
inputFormat
The first line contains an integer \( n \) representing the number of participants.
Each of the next \( n \) lines contains a string in the format \( HH:MM:SS \), representing a participant's completion time.
outputFormat
Output \( n \) lines, where the \( i^{th} \) line corresponds to the medal assigned to the \( i^{th} \) participant from the input. The possible medals are: Gold, Silver, and Bronze.
## sample4
00:45:30
00:30:20
00:50:00
00:45:30
Silver
Gold
Bronze
Silver
</p>