#include <bits/stdc++.h>
using namespace std;
int main() {
  int j, f, b;
  while (cin >> j >> f >> b) {
    if (j == -1 && f == -1 && b == -1) break;
    int ansj = 2, ansf = 0, ansb = 0;
    ansj -= j;
    if (f > ansf) {
      ansj--;
      ansf = 60;
    }
    ansf -= f;
    if (b > ansb) {
      ansf--;
      ansb = 60;
    }
    ansb -= b;
    cout << '0' << ansj << ':';
    if (ansf < 10) cout << '0';
    cout << ansf << ':';
    if (ansb < 10) cout << '0';
    cout << ansb << endl;
    f += j * 60;
    b += f * 60;
    if (b % 3 != 0) {
      b /= 3;
      b += 1;
    } else
      b /= 3;
    f = b / 60;
    b %= 60;
    j = f / 60;
    f %= 60;
    ansj = 2;
    ansf = 0;
    ansb = 0;
    ansj -= j;
    if (f > ansf) {
      ansj--;
      ansf = 60;
    }
    ansf -= f;
    if (b > ansb) {
      ansf--;
      ansb = 60;
    }
    ansb -= b;
    cout << '0' << ansj << ':';
    if (ansf < 10) cout << '0';
    cout << ansf << ':';
    if (ansb < 10) cout << '0';
    cout << ansb << endl;
  }
  return 0;
}
