#include <cstdio>
#include <iostream>
using namespace std;

int main()
{
	int h, m, s;
	int t_3;

	while (scanf("%d%d%d", &h, &m, &s), h != -1){
		t_3 = h * 3600 + m * 60 + s;
		t_3 /= 3;
		printf("%02d:%02d:%02d\n", t_3 / 3600, t_3 % 3600 /  60, t_3 % 60);
		printf("%02d:%02d:%02d\n", h, m, s);
	}

	return (0);
}