import std.stdio, std.string, std.conv;
import std.array, std.algorithm, std.range;

void main()
{
    foreach(a;stdin.byLine().map!(s=>s.split().map!(to!int).array()).array().until([-1,-1,-1]))
    {
        auto r = new int[3];
        foreach(i,v;[2,0,0]) r[i]=v-a[i];
        foreach_reverse(i;1..3) if(r[i]<0) --r[i-1],r[i]+=60;
        r.map!(n=>format("%02d",n)).join(":").writeln();
        foreach(ref v;r) v*=3;
        foreach_reverse(i;1..3) r[i-1]+=r[i]/60,r[i]%=60;
        r.map!(n=>format("%02d",n)).join(":").writeln();
    }
}