#include <iostream>
using namespace std;
int main() {
int h1, m1, s1, h2, m2, s2;
cin >> h1 >> m1 >> s1 >> h2 >> m2 >> s2;
if (s2 < s1) {
s2 += 60;
m2 -= 1;
}
if (m2 < m1) {
m2 += 60;
h2 -= 1;
}
cout << h2 - h1 << " " << m2 - m1 << " " << s2 - s1;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwogCmludCBtYWluKCkgewoJaW50IGgxLCBtMSwgczEsIGgyLCBtMiwgczI7CiAgICBjaW4gPj4gaDEgPj4gbTEgPj4gczEgPj4gaDIgPj4gbTIgPj4gczI7CiAgICBpZiAoczIgPCBzMSkgewogICAgICAgICBzMiArPSA2MDsKICAgICAgICAgbTIgLT0gMTsKICAgIH0KICAgIGlmIChtMiA8IG0xKSB7CiAgICAgICAgIG0yICs9IDYwOwogICAgICAgICBoMiAtPSAxOwogICAgfQogICAgY291dCA8PCBoMiAtIGgxIDw8ICIgIiA8PCBtMiAtIG0xIDw8ICIgIiA8PCBzMiAtIHMxOwoJcmV0dXJuIDA7Cn0=