#include #include using namespace std; int a,b,c,d; float x; main() { scanf("%d %d UTC%f",&a,&b,&x); x=8.999-x; c=x; d=x*10-c*10; b=b-d*6; if(b<0)b+=60,a--; else if(b>=60)b-=60,a++; a=(a-c+24)%24; printf("%02d:%02d\n",a,b); }