P10409 "QFOI R2" Shallow Stream as the Water Falls
Description
Xiao R is a cute girl. One night at $23$ o'clock, when she was submitting homework, she found that the deadline was $0$ o'clock of the same day (midnight). To avoid this tragedy happening again, she introduced to you the "30-hour system".
In the 30-hour system, a day is still $24$ hours long. The only difference is that the daily time range changes from $00:00\sim 23:59$ to $06:00\sim 29:59$. Specifically, for times between $06:00\sim 23:59$ in the 24-hour system, the representation stays the same. After $00:00$ of the next day, the date stays unchanged, and the hour part of the time keeps increasing until it reaches $06:00$ of the next day.
For example, the table below shows some corresponding times:
|$24$-hour system|$30$-hour system|
|:-:|:-:|
|$2024$ Year $2$ Month $13$ Day $06:00$|$2024$ Year $2$ Month $13$ Day $06:00$|
|$2024$ Year $2$ Month $13$ Day $12:00$|$2024$ Year $2$ Month $13$ Day $12:00$|
|$2024$ Year $2$ Month $13$ Day $18:00$|$2024$ Year $2$ Month $13$ Day $18:00$|
|$2024$ Year $2$ Month $14$ Day $00:00$|$2024$ Year $2$ Month $13$ Day $24:00$|
|$2024$ Year $2$ Month $14$ Day $05:59$|$2024$ Year $2$ Month $13$ Day $29:59$|
|$2024$ Year $2$ Month $14$ Day $06:00$|$2024$ Year $2$ Month $14$ Day $06:00$|
Now you are given a time in the 24-hour system. Convert it to the 30-hour system.
Since Xiao R also thinks handling leap years is troublesome, you do not need to tell her the date. You only need to tell her the time.
Input Format
One line with one string in the format `hh:mm`, representing a time in the 24-hour system. In particular, if the hour or minute has fewer than two digits, leading zeros will be added to make it two digits.
Output Format
One line with one string in the format `hh:mm`, representing the corresponding time in the 30-hour system. If the hour or minute has fewer than two digits, you also need to add leading zeros to make it two digits. You do not need to consider whether the date changes.
Explanation/Hint
**Explanation for Sample $1$.**
$14:00$ is within the range $06:00\sim 23:59$, so the representation stays unchanged.
---
**Constraints.**
This problem does not use bundled testdata.
For all data: the input is guaranteed to be a valid 24-hour time as specified in the [Input Format].
---
**Hint.**
The table in the [Description] provides more usable samples.
Translated by ChatGPT 5