Tattah is asleep if and only if Tattah is attending a lecture. This is a well-known formula among Tattah's colleagues.

On a Wednesday afternoon, Tattah was attending Professor HH's lecture. At 12:21, right before falling asleep, he was staring at the digital watch around Saher's wrist. He noticed that the digits on the clock were the same when read from both directions i.e. a palindrome.

In his sleep, he started dreaming about such rare moments of the day when the time displayed on a digital clock is a palindrome. As soon as he woke up, he felt destined to write a program that finds the next such moment.

However, he still hasn't mastered the skill of programming while sleeping, so your task is to help him.

Input

The first and only line of the input starts with a string with the format "HH:MM" where "HH" is from "00" to "23" and "MM" is from "00" to "59". Both "HH" and "MM" have exactly two digits.

Output

Print the palindromic time of day that comes soonest after the time given in the input. If the input time is palindromic, output the soonest palindromic time after the input time.

Examples

Input

12:21


Output

13:31


Input

23:59


Output

00:00

import sys
def get_single_int ():
    return int (sys.stdin.readline ().strip ())
def get_string ():
    return sys.stdin.readline ().strip ()
def get_ints ():
    return map (int, sys.stdin.readline ().strip ().split ())
def get_list ():
    return list (map (int, sys.stdin.readline ().strip ().split ()))

#code starts here
s = get_string ()
ar = s.split (':')
check = True
for i in range (int (ar [1]) + 1, 60):
    #if i is a single digit integer like - 9 or 8, then add a zero before it
    if (len (str (i)) == 1):
        tmp_str = '0' + str (i)
    else:
        tmp_str = str (i)
    if tmp_str [::-1] == ar [0]:
        ar [ 1 ] = tmp_str
        print (":".join (ar))
        check = False
        break
if check:
    if ar [0] == '23':
        print ('00:00')
    else:
        while (check):
            ar [ 0 ] = str (int (ar [0] ) + 1)
            if (len (ar [ 0]) == 1) :
                ar [ 0] = '0' + ar [ 0 ]
            for i in range (0, 60):
                if len (str (i))== 1:
                    tmp_str = '0' + str (i)
                else:
                    tmp_str = str (i)
                if (tmp_str [::-1] == ar [ 0]):
                    ar [ 1 ] = tmp_str
                    check = False
                    print (":".join (ar))

