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.
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.
12:21
13:31
23:59
00:00
15:51
20:02
10:44
11:11
04:02
04:40
02:11
02:20
12:15
12:21
07:07
10:01
00:17
01:10
04:55
05:50
02:17
02:20
07:56
10:01
00:29
01:10
23:31
23:32
19:30
20:02
12:14
12:21
17:32
20:02
03:44
04:40
07:15
10:01
18:42
20:02
08:56
10:01
04:50
05:50
14:32
14:41
23:23
23:32
08:35
10:01
03:32
04:40
07:59
10:01
14:12
14:41
23:52
00:00
16:36
20:02
17:50
20:02
06:59
10:01
16:50
20:02
00:00
01:10
23:59
00:00
23:33
00:00
time = list(map(int, input().split(':')))
tempo = 100*time[0] + time[1]

if 0 <= tempo < 110:
    tempo = 110
elif 110 <= tempo < 220:
    tempo = 220
elif 220 <= tempo < 330:
    tempo = 330
elif 330 <= tempo < 440:
    tempo = 440
elif 440 <= tempo < 550:
    tempo = 550
elif 550 <= tempo < 1001:
    tempo = 1001
elif 1001 <= tempo < 1111:
    tempo = 1221
elif 1221 <= tempo < 1331:
    tempo = 1331
elif 1331 <= tempo < 1441:
    tempo = 1441
elif 1551 <= tempo < 2002:
    tempo = 2002
elif 2002 <= tempo < 2112:
    tempo = 2112
elif 2112 <= tempo < 2222:
    tempo = 2222
elif 2222 <= tempo < 2332:
    tempo = 2332
else:
    tempo = 0

t = tempo//100
if t < 10:
    print(0, end='')
print(t, end='')
print(":",end='')
m = tempo - t*100
if m == 0:
    print(m,end='')
print(m)

 	      	 	 	 	  		   		  	  		