926_I. A Vital Problem
Polycarp has a strict daily schedule. He has n alarms set for each day, and the i-th alarm rings each day at the same time during exactly one minute.

Determine the longest time segment when Polycarp can sleep, i. e. no alarm rings in that period. It is possible that Polycarp begins to sleep in one day, and wakes up in another.

Input

The first line contains a single integer n (1 ≤ n ≤ 100) — the number of alarms.

Each of the next n lines contains a description of one alarm. Each description has a format "hh:mm", where hh is the hour when the alarm rings, and mm is the minute of that hour when the alarm rings. The number of hours is between 0 and 23, and the number of minutes is between 0 and 59. All alarm times are distinct. The order of the alarms is arbitrary.

Each alarm starts ringing in the beginning of the corresponding minute and rings for exactly one minute (i. e. stops ringing in the beginning of the next minute). Polycarp can start sleeping instantly when no alarm is ringing, and he wakes up at the moment when some alarm starts ringing.

Output

Print a line in format "hh:mm", denoting the maximum time Polycarp can sleep continuously. hh denotes the number of hours, and mm denotes the number of minutes. The number of minutes should be between 0 and 59. Look through examples to understand the format better.

Examples

Input

1
05:43


Output

23:59


Input

4
22:00
03:21
16:03
09:59


Output

06:37

Note

In the first example there is only one alarm which rings during one minute of a day, and then rings again on the next day, 23 hours and 59 minutes later. Polycarp can sleep all this time.
```python
n = int(input())
a = []

for i in range(n):
    str = input()
    h = int(str[0:2]) * 60
    m = int(str[3:5])
    a.append(h + m)

a.sort()

mx = 0

for i in range(n - 1):
    if mx < ((-a[i] + a[i + 1]) - 1):
        mx = ((-a[i] + a[i + 1]) - 1)
if mx < (1440 + a[0] - a[n - 1] - 1):
    mx = 1440 + a[0] - a[n - 1] - 1

if (mx // 60) < 10:
    print('0',end='')
    
print(mx // 60,end='')

print(':',end='')

if (mx % 60) < 10:
    print('0',end='')

print(mx % 60)

```