#include<stdio.h>
struct time
{
	int hour;
	int minute;
	int second;
};
int main()
{
	struct time a;
	scanf("%d %d %d",&a.hour,&a.minute,&a.second);
	a.second+=1;
	if(a.second==60&&a.minute<=59)
	{
	a.minute+=1;
	a.second=0;
	}
	if(a.minute==60&&a.hour<=23)
	{
		a.minute=0;
		a.hour+=1;
	}
	if(a.hour==24)
	a.hour=a.minute=a.second=0;
	printf("%d:%d:%d",a.hour,a.minute,a.second);
	return 0;
}

