#include <bits/stdc++.h>
int main(void) {
  int i, T, H, S, r[6] = {}, a[6];
  while (1) {
    scanf("%d %d %d", &T, &H, &S);
    if (T == -1 && H == -1 && S == -1) break;
    for (i = 0; i < 6; i++) {
      a[i] = 0;
    }
    S += 3600 * T + 60 * H;
    r[2] = 7200 - S;
    r[5] = 7200 - S / 3;
    r[0] = r[2] / 3600;
    r[2] %= 3600;
    r[3] = r[5] / 3600;
    r[5] %= 3600;
    r[1] = r[2] / 60;
    r[2] %= 60;
    r[4] = r[5] / 60;
    r[5] %= 60;
    for (i = 0; i < 6; i++) {
      if (r[i] / 10) a[i] = 1;
    }
    for (i = 0; i < 6; i++) {
      switch (a[i]) {
        case 0:
          printf("0");
        case 1:
          printf("%d", r[i]);
          break;
      }
      if (i == 2 || i == 5)
        puts("");
      else
        printf(":");
    }
  }
  return 0;
}
